...

View Full Version : Connect to remote odbc using PHP



lau87
07-02-2009, 12:17 AM
Ok, this is complicated and I have searched for a while on the internet finding for a solution.
There are 2 hosts involved, in short host A and host B.
Host A provides a service and host B has the Microsoft Access database.
On host A customers can fill in a form. The data must be stored in the database on host B.
In other words, I must create a connection between host A and B, connect to a remote odbc database.
The question is, I can get it working with the code I have now:

$cnx = odbc_connect("DRIVER={Microsoft Access Driver (.mdb)};SERVER=193.173.70.xxx;UID="";PWD="";DATABASE=dbtestdb;");

The 193.173.70.xxx is the ip-address of host B with the DNS called 'dbtestdb', the file that is running with the code is on host A.
I figured it out that there is no need to set a path to the mdb file, because once I get the connection to the remote odbc the path is fixed on this host (B).
But I am getting the following error while running the code on host A:
Warning: Wrong parameter count for odbc_connect() in ...

Anyone who can help me or has experience with this error/problem



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum