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
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.