Â
Hi, I deliberated if anyone could help, I have a MySQL database that is hosted on a UNIX server on the internet I wanted to connect to it with Visual FoxPro Vr 8 from a Windows PC. Is this probable, How do I set mysql in VFP to do this ?
Set MySQL in VFP from internet VFP version 8
Hi Altha Tuller,
It is possible to connect VFP with MySQL database in Windows. In order to do that, you should install MySQL ODBC.
Â
And make sure that your UNIX system is reachable from the Windows System.
Â
Â
Below is a sample code for setting up MySQL connection using VFP.
Â
lcServer="IP address of the server where mysql is installed"
lcDatabase="Your MySQL database name"
lcUser = "Username"
lcPassword = "Password"
lcStringConn="Driver={MySQL ODBC 5.2.3 Driver}"+; //If you are using 'MySQL ODBC 5.2.3 Driver'
       ";Server="+lcServer+;
       ";Database="+lcDatabase+;
       ";Uid="+lcUser+;
       ";Pwd="+lcPassWord
lnHandle=SQLSTRINGCONNECT(lcStringConn)
Â
Hope it helps.