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


> >
> > Visual Foxpro is the best tool (but sidelined by M$) to design Client/Server applications. It can talk to every DataBase Engine including MS SQL, MySQL, Oracle, Sybase, Access .....
> >
> > You can adopt different methods to manipulate the Server data like SPT, Cursor Adapters, Remote Views, whatever suits you.
> >
> > You can find connections string here : www.connectionstrings.com
> >
> > Regards,
> > Akram
>
> >>>>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

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