php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27770 reading data from Access thrugh COM function
Submitted: 2004-03-30 04:12 UTC Modified: 2004-04-05 08:55 UTC
From: kaija_jan at hotmail dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 5.0.0RC1 OS: windows 2k
Private report: No CVE-ID: None
 [2004-03-30 04:12 UTC] kaija_jan at hotmail dot com
Description:
------------
i try to use COM function to read data from Access database.
but if the fields type is ole object. the data will different with the asp code.
here is my php code. the type of field "test" is oleobject.
there is no error during run time.

Reproduce code:
---------------
<?
	$oConn = new COM("ADODB.Connection");
	
	$oConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\abc.mdb");
	
	$oRs = $oConn->Execute("select * from test");
	
	$a = "c:\abc";
	
	while(!$oRs->EOF)
	{
		$Data = $oRs->Fields->["test"]->value;
		
		$oRs->MoveNext();
	}
	
	$oRs->Close();
	$oConn->Close();
	
	$oRs->Release();
	
	unset($oRs);
	unset($oConn);
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-30 05:21 UTC] wez@php.net
Please indicate how the data is different.
Also, are you sure that your example script is correct?
$oRs->Fields->["test"]->value
            ^^^^
           this looks bogus

$oRs->Release() won't work in PHP 5

Please read this for more information:
http://www.zend.com/php5/articles/php5-dotnet.php

 [2004-04-05 08:55 UTC] sniper@php.net
See Wez's comment..

 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Feb 03 14:03:43 2023 UTC