Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect VFP to SQL Server w/o ODBC
Message
 
 
À
27/11/2000 15:05:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00445800
Message ID:
00445804
Vues:
24
>Is it possible to acces SQL Server tables via VFP without using ODBC?
>OR at least without configure ODBC on each client station??
>If yes, how can I do that?
>Thank you in advance.

No for the first question, and yes for the second.

VFP can not access SQL Server directly. To access it, you have the following options:

1. SQL Pass-thru - uses ODBC driver to connect to SQL Server
2. ADO - can be congfigured to use either ODBC driver or OLE-DB provider
3. Remote Views - provides a VFP friendly wrapper to SQL Pass-thru so it uses ODBC

IAC, you need to install something on each client machine.

As for question 2, you do not need an entry in the ODBC Configurator to connect to SQL Server. Yo can use SqlStringConnect to get a valid remote handle. Try:

lcconn = [Database=]+tcDatabase+[;Server=]+tcDatabaseServer+[;Driver=SQL Server]
lcconn = lcconn + [;UID=]+tcUID+[;PWD=]+lcPWD
lnhandle = sqlstringconnect(lcconn)

where
tcDatabase is the database to connect to
tcDatabaseServer is the name or IP address of the server (provided you are using TCPIP to connect)
UID is the user ID to use to login to the database
PWD is the password

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform