> Hi there, can anyone teach me how to connect VFP9 to MySQL whithin a network? Should i download something? Thanks...
you can connect by using SQLSTRINGCONNECT() function
This example is using ODBC driver for MySQL
for more details check:
http://fox.wikis.com/wc.dll?Wiki~VFPCommandSQLStringConnect~VFP
lcServer="localhost"
lcDatabase="test"
lcUser = "root"
lcPassword = "root"
lcStringConn="Driver={MySQL ODBC 3.51 Driver};Port=3306"+;
";Server="+lcServer+;
";Database="+lcDatabase+;
";Uid="+lcUser+;
";Pwd="+lcPassWord
*** Don't prompt for login
SQLSETPROP(0,"DispLogin",3)
lnHandle=SQLSTRINGCONNECT(lcStringConn)
IF lnHandle > 0
? SQLTABLES(lnHandle,"TABLES")
browse last nocaptions
SQLDISCONNECT(lnHandle)
ELSE
=AERROR(laError)
MESSAGEBOX("Error at Connecting"+CHR(13)+;
"Description:"+laError[2])
ENDIF
-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email:
sur200@indiatimes.comCheck my blog for details:
http://weblogs.foxite.com/sur200----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.