Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: ODBC
Divers
Thread ID:
00415453
Message ID:
00415730
Vues:
21
>We have an oracle table out there somwhere that has some data in it I need. I read somewhere that VFP 6.0 can go out and get that data. The IT folks gave me an IP address, login and password and said good luck! I have no idea how to do this. Any suggestions as to how I do this?
>
>Thanks in advance BIG TIME for this one! :-)

First, you have to have the Oracle client [SQL*Net or Net80] installed on each computer that will be needing this type of access.

Second, you have to add an entry to the TNSNAMES.ORA file that gives the parameters to the server, including the IP address of the server. See my article in the ARTICLES section here in the Client/Server category. If you install the Oracle8 client, use the Oracle Net8 Easy Config utility to add the new data source. This will be found in the Oracle For Windows group under Start/Programs.

Third, you have several ways to get the data from VFP. The first 2 require a DBC and a connection in the DBC. You can create a connection that uses a user-id, password and DSN that you create via the ODBC Administrator found in the Control Panel [least desirable]. The alternative is to create a connection that uses a connect string and the ODBC DSN [acceptible]. Or you can go strictly with SPT and use a DSN-less connection. The syntax for that is:

nConnectHandle = sqlstringconnect('Driver=Microsoft ODBC for Oracle;UID=userid_here;PWD=userpassword;CONNECTSTRING=service_name_from tnsnames.ora_file;')

Then you can store the nConnectHandle in an application object property where it will be available to all forms to use in SPT [SQLExec].

For more info see the functions, SQLConnect, SQLStringConnect and SQLExec, in the VFP Help.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform