Jump to content

Connect To Remote mdb


googlexx

Recommended Posts

i have a mdb file on a webserver and im trying to connect to it but its not working....

 

this is the error:

 

Parse error: syntax error, unexpected T_VARIABLE

 

$conn = new CreateObject("ADODB.Connection")

// Microsoft Access connection string.
$conn->Open("Provider=Microsoft.ACE.OLEDB.12.0; Remote Server=http:1.1.1.1:8080; Data Source=season.mdb;");

 

Link to comment
https://forums.phpfreaks.com/topic/165305-connect-to-remote-mdb/
Share on other sites

$conn = new CreateObject("ADODB.Connection");

// Microsoft Access connection string.
$conn->Open("Provider=Microsoft.ACE.OLEDB.12.0; Remote Server=http:1.1.1.1:8080; Data Source=season.mdb;");

 

That should fix your parse error.  Then you can see if the code actually works.  There was a missing ";" symbol.

oops haha, ok i changed it but not im getting:

 

Fatal error: Class 'COM' not found

 

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

// Microsoft Access connection string.
$conn->Open("Provider=Microsoft.ACE.OLEDB.12.0; Remote Server=http:1.1.1.1:8080; Data Source=C:\xampp\htdocs\season.mdb;");

alright how do i use this example to connect to a remote mdb? i don't quite get it :( whats the username and pass for and where do i put in an ip?

 

// Microsoft Access
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename", $user, $password);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.