Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd ADO behavior

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
So I have a simple little php script called connect.php which connects me to my database... I have it included in my big script and it runs fine... however, at the moment I want to poke around a few things and have included it in a script which does nothing but include connect.php (posted below"). When I do this there's an error message of the variety:
Code:
Warning: Invoke() failed: Exception occurred. Source: ADODB.Connection Description: ADO could not find the specified provider. in E:\path\info\connect.php on line 6

And here is connect.php
Code:
<?php

$conn = new COM(&quot;ADODB.Connection&quot;) or die(&quot;Cannot start ADO&quot;); 

// Microsoft Access connection string.
$conn->Open(&quot;Provider=Microsoft,.Jet.OLEDB.4.0; Data Source=E:\\path\\info\\&quot;.DATABASE);
?>

DATABASE is defined the same in each script, and it's a Microsoft Access Database I'm connecting to (not my choice).

Any ideas for why this could be happening or what the fix is?

All help much appreciated.
-Rob
 
Bah, they need to let us delete our posts... anyway, adding Mode=ReadWrite;Persist Security Info=False to my connection string fixed it... but this is still odd behavior, why should it matter in which script it's included?

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top