Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: jay manuel
  Where is jay manuel?
 davao
 New York - Philippines
 jay manuel
 To: M. Akram Bhatti
  Where is M. Akram Bhatti?
 Riyadh
 Saudi Arabia
 M. Akram Bhatti
 Tags
Subject: RE: database
Thread ID: 249304 Message ID: 249326 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Thursday, December 31, 2009 8:40:15 PM         
   


> >
> > >>>>how can connect to the mysql if i am using visual fox pro 9?
>
> To connect to a database in local server.
>
>
lnHandle = SQLSTRINGCONNECT("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;")

>
> To connect to a database in remote server.
>
>
lnHandle = SQLSTRINGCONNECT("Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;")
> 
> IF lnHandle > 0
>   lnSuccess = SQLEXEC(lnHandle, "Select * From YourTable", "curResult")
>   IF lnSuccess > 0
>      SELECT curResult
>      BROWSE
>   ELSE
>      AERROR(laErr)
>      MESSAGEBOX(laErr[2])
>   ENDIF
> ELSE
>   MESSAGEBOX("Connection Failed")
> ENDIF

>
> Regards,
> Akram


>>>thanks a lot.... where do i put that?

ENTIRE THREAD

database Posted by jay manuel @ 12/31/2009 4:10:32 PM
RE: database Posted by Anders Altberg @ 12/31/2009 4:32:17 PM
RE: database Posted by jay manuel @ 12/31/2009 5:34:34 PM
RE: database Posted by M. Akram Bhatti @ 12/31/2009 4:39:41 PM
RE: database Posted by jay manuel @ 12/31/2009 5:36:11 PM
RE: database Posted by jay manuel @ 12/31/2009 5:40:26 PM
RE: database Posted by M. Akram Bhatti @ 12/31/2009 6:49:05 PM
RE: database Posted by jay manuel @ 12/31/2009 8:40:15 PM
RE: database Posted by kulwant singh @ 1/1/2010 2:39:34 PM
RE: database Posted by jay manuel @ 1/1/2010 4:21:54 PM
RE: database Posted by Patrick McGreevy @ 1/4/2010 2:15:46 AM