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
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.

Link to comment
Share on other sites

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;");

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.