Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Leonard Trevor
  Where is Leonard Trevor?
 Edinburgh
 United Kingdom
 Leonard Trevor
 Tags
Subject: RE: simple program connecting vfp to sql using spt
Thread ID: 104206 Message ID: 104220 # Views: 3 # Ratings: 1
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Sunday, August 13, 2006 2:01:44 PM         
   


> I have converted my datafiles from visual foxpro to a client server using sql server.
>
> I will be grateful if someone will provide me with the program segment connection fron the workstation to the server.


There are two options. Either you use a DSN (in which case you have to create the appropriate registry entries for each user) or else you use a DSN-Less connection in which case your application has to create the connection string 'on the fly'.

Eitehr way you need to know, at minimum, the Database Name, the (ODBC presumably) Driver to use and User Login ID and Password so that you can connect.


> How do i reference the sql database from a client workstation in my program, (.i.e setting the path from the worksation to the server) I want to generate an executable, which when installed at the client end should be able to reference the database say nortwind.

That is what your connection/DSN is for - it contains the necessary information that enables the application to locate the server.

For details of connection strings, you can go to: http://www.carlprothman.net/Default.aspx?tabid=81


Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

simple program connecting vfp to sql using spt Posted by Leonard Trevor @ 8/13/2006 8:39:44 AM
RE: simple program connecting vfp to sql using spt Posted by Jojo Sabino @ 8/13/2006 9:07:03 AM
RE: simple program connecting vfp to sql using spt Posted by Leonard Trevor @ 8/13/2006 9:22:42 AM
RE: simple program connecting vfp to sql using spt Posted by Zaldy Santos @ 8/13/2006 9:28:41 AM
RE: simple program connecting vfp to sql using spt Posted by Leonard Trevor @ 8/13/2006 9:45:46 AM
RE: simple program connecting vfp to sql using spt Posted by Jojo Sabino @ 8/13/2006 9:45:18 AM
RE: simple program connecting vfp to sql using spt Posted by Leonard Trevor @ 8/13/2006 9:50:37 AM
RE: simple program connecting vfp to sql using spt Posted by Jojo Sabino @ 8/13/2006 10:00:27 AM
RE: simple program connecting vfp to sql using spt Posted by Bernard Bout @ 8/14/2006 6:18:07 AM
RE: simple program connecting vfp to sql using spt Posted by Ken Murphy @ 8/16/2006 2:28:43 PM
RE: simple program connecting vfp to sql using spt Posted by Andy Kramek @ 8/13/2006 2:01:44 PM