If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > DB Connection Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-13-03, 05:52
ljonny18 ljonny18 is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
Unhappy DB Connection Error

Hi.

I am trying to connect to a Microsoft Access DB using the following PHP connection string: -

<?php
$db = 'db/ljonny18.mdb';
$conn = new COM('ADODB.Connection');
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");

$sql = "select * from guestbook";
$rs = $conn->Execute($sql);
?>


It works fine on my local machine, but when I put it online i get the folloeing error: -

Fatal error: Cannot instantiate non-existent class: com in /home/ljonny18/public_html/ljonny18/guestbook.php on line 3


NOTE - line 3 is: -
"$conn = new COM('ADODB.Connection');"

Could someone please help,

Thanks,
Jon.
Reply With Quote
  #2 (permalink)  
Old 12-15-03, 00:22
i4u_dev4 i4u_dev4 is offline
Registered User
 
Join Date: Oct 2003
Posts: 13
Thumbs up have a look

might be this informaiton can help you

http://www.php.net/manual/en/faq.dat...tabases.access
__________________
Manish Khanna
manish@i4u.com.au
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On