Page 1 of 1

error connect remote foxpro DB thru ODBC

Posted: Thu Dec 09, 2004 5:17 am
by valen53
is OK to connect foxpro DB thru ODBC in local pc.
but when i connect remote foxpro DB thru ODBC, it occur error.

Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Server, SQL state 01S00 in SQLConnect in C:\Apache Group\Apache...

i search this warning quite many time already, but still can't get the answer.

anybody know how to solve it?

Code: Select all

<?php
$dsn = "Driver={Microsoft Visual FoxProDriver}; Server=bca_server; Database=dw" ;
$pr=odbc_pconnect($dsn,"root",""); 
?>

Posted: Sat Dec 11, 2004 3:27 pm
by ol4pr0
Take a look a this

RIGHT HERE

Posted: Sun Dec 12, 2004 9:02 pm
by valen53
thanks reply.

Code: Select all

<?php
$dsn = "Driver={Microsoft Visual FoxPro Driver}; Server=localhost;SourceType=DBC;SourceDB=D:\installer\data_DEMO\myapp.dbc;Exclusive=No;";
$pr=odbc_pconnect($dsn,"root","");
?>
it is another way i used, it work for localhost only. if i change to other pc, like below , warning occur .

Code: Select all

<?php
$dsn = "Driver={Microsoft Visual FoxPro Driver}; Server=192.168.0.5;SourceType=DBC;SourceDB=D:\installer\data_DEMO\myapp.dbc;Exclusive=No;";
?>
Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Cannot open file c:/data_demo/myapp.dbc.


THE URL u show, i saw already.. then i follow to do it.

Code: Select all

<?php
$database_type = "vfp" ;
$host = "localhost" ;
$user = "root" ;
$password = "" ;
$dbname = "myapp" ;

include("adodb/adodb.inc.php");
$pr = NewADOConnection("$database_type");
$db->Connect("$host","$user","$password","$dbname");
?>
error again.
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Apache

any resource can provide ?