Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-02-2009, 12:17 AM   PM User | #1
lau87
New Coder

 
Join Date: Jul 2009
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
lau87 is an unknown quantity at this point
Connect to remote odbc using PHP

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:
PHP Code:
$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
lau87 is offline   Reply With Quote
Reply

Bookmarks

Tags
connect, odbc, remote

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:48 AM.


Advertisement
Log in to turn off these ads.