Hi peoples,..
This is my first post here, so if problems like this,
please notify me,...
My problem is like this.
I;ve read the manual, -- the CHM version,
It;s about the COM object.
I've try to query an access database using PHP.
So far it works fine.
The only problems is that when i tried to
use the GetRows method, it start complaining.
This is the error when executed
Warning: Unsupported: multi-dimensional (2) SafeArrays in
C:\Apache\htdocs\www\test.php on line 19
The error seems to be pointing at the GetRows, and the result of
getrows that
maybe not supported in PHP. I know there;s a workaround of these kind
of problems
when using Javascript under ASP -- using the enumerator object.
My question : How bout PHP? Is there any workaround instead of getting
the result
by iterating one by one line in the manuals?
btw, here's the code:
<?php
/** Create An Ado COM object **/
$conn = new COM("ADODB.Connection") or
die("Cannot Create ADO Object");
/** Define the datasource names **/
$dsn = "Provider=Microsoft.Jet.OLEDB.3.51;
Data Source=C:\\Program Files\\Microsoft Visual
Studio\\VB98\\Biblio.mdb";
/** open the connection here **/
$conn->Open($dsn);
/** Execute the sql query **/
$rs = $conn->Execute("SELECT * FROM Authors");
/** Get All The result rows **/
$result = $rs->GetRows();
/** Test if its there , Should be an array **/
print_r($result);
/** close the recordset and the connection **/
$rs->Close();
$conn->Close();
/** release the com **/
$rs->Release();
$conn->Release();
/** make sure that it was clean **/
$rs = null;
$conn = null;
?>
thanks,....
=====
eval(preg_replace("/x/xis","print",/** ferdhie | be-different **/
'x"Just ";eval(\'x"Another ";x"PHP ";eval("x\"Hacker,\";");\');'));
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php