What error do you get? What's the version of VFP ODBC driver on WinXP? The latest one is 6.01.8629.01
>Hi, I wrote a program that creates a connection using sqlconnect() function.
>After compilation, I tried to run the exe program on a windows 98 and 2000 OS and the system worked properly. I also tried to run it in windows xp but the connection failed. Need your help guys, the code is provided below :
>
>Public VCONNSTR
>sConn = "Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB="
>cPathDBC = ALLTRIM(SYS(5))+ALLTRIM(CURDIR())+[FILES\BADMINTONFILES\BADMINTONDBC.DBC]
>sConn = sConn+cPathDBC+";SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
>Open Database BADMINTONRV
>DBSETPROP("BADCONN","CONNECTION","CONNECTSTRING",sConn)
>nConn = SQLSTRINGCONNECT(sConn)
>
>IF nConn>0
> VCONNSTR = sConn
>ELSE
> =MESSAGEBOX('Cannot connect to System Database!',0+16,'Connection Problem')
> RETURN
>ENDIF
--sb--