Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Leonard Trevor
  Where is Leonard Trevor?
 Edinburgh
 United Kingdom
 Leonard Trevor
 To: Jojo Sabino
  Where is Jojo Sabino?
 Makati City
 Philippines
 Jojo Sabino
 Tags
Subject: RE: simple program connecting vfp to sql using spt
Thread ID: 104206 Message ID: 104213 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Sunday, August 13, 2006 9:50:37 AM         
   


The application relies on ODBC. its working alright.

All I need now is the script that invokes the database on the server from the worksation using the shortcut.

any help"




> > I 've done all that, and its working well.
> >
> > All I need now is calling the sql server from the client workstation.
> > I'm doing an installation tomorrow, so I want to know how to do that.
> >
> >
> >
> > The program runs alright in the development environment, because i'm using one computer.
> >
> >
>
> Are your app connection on development rely on ODBC or Hard Coded SQL Code?
>
> If it is on ODBC / DSN name, you can just simply setup the same DSN "name" in Client PC same name as in your Development pc (but ofcourse it is not in 'Local') you should give the correct "Server Name" and the Type of authentication your client should use to connect to your SQL Server.
>
> Here is a sample run on client PC connect to a SQL Server.
>
>
**lconn = SQLCONNECT('MyDSN_SQL')  && If your using DSN (ODBC)
> 
> lconn = SQLSTRINGCONNECT('DRIVER=SQL Server;SERVER=ALMACON-SWCC;UID=;PWD=;APP=Microsoft Visual FoxPro;WSID=CLIENTPC;DATABASE=northwind;')  && If Your using Stringconnect 'Server' may change 
> 
> IF lconn > 0
>  MESSAGEBOX('Ok')
>  SQLEXEC(lconn, 'Select * from Category', 'cResult')
>  browse
>  
>  SQLDISCONNECT(lconn)
> ELSE
>  MESSAGEBOX('Not Connected!')
> ENDIF

>
> Hope this might give you an idea.
>
> ynajoe


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