Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to connect to oracle dbf
Message
From
26/06/1999 19:32:10
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00230838
Message ID:
00234409
Views:
27
>>>>>I am using trying to use the connection mgr to access my slq/oracle table but not having any luck following the online help and even bringing up the Remote Data Tab, Options Dialog Box. Is there a command I can execute that will do this for me quickly?
>>>>Have you already established the connection using your windows ODBC?
>>>
>>>I have not but got lost trying to do that in connection mgr.
>>O.K. Try this. map a drive to your oracle data source.Go to your windows control panel( or with your database open select Database/Connections - NEW- Will take you to same place) and open the ODBC administrator(User DSN tab)
>>and select add then select the driver you want to use(if not installed go to previous screen and add )this will bring up a screen for Odbc setup - this screen is differt according to the driver you are using.If you have problems and filling out this form let me know which drive you are using - I have setups for microsoft, oracle73, visigenic 32 and oracle 8.00 so I may be able to help.
>
>I am with oracle8, I went in like you said and selected "microsoft ODBC driver for oracle" although I could have chosen "microsoft ODBC for oracle".
>I filled out the dialog and saw
>--data source name
>-description
>-user name
>-connect string
>I was not sure what to put in connect string but in data source name I put the name of my oracle instance. What's next I wonder.


data source name - this is descriptive - no effect on your Oracle connection
description - descriptive only, as above
user name - your oracle user id, created for you by the Oracle dba
connect string - this is the oracle instance ("sid")

To connect to Oracle,

1. Install Oracle's SQL*Net client (this would be the easiest way). Your Oracle DBA should have an installation cd for this.

2. Configure your "SQL Net Configuration" using the SQL Easy Configuration utility, or manually editing the file - this updates a file called "tnsnames.ora", located in your \orawin95\network\admin directory. This (text) file would look like:
======
Example3.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = nmp.world)
(PROTOCOL = NMP)
(Server = FinanceServer1)
(Pipe = ORAPIPE)
)
)
(CONNECT_DATA = (SID = ORCL)
)
)
======
Depending on your Oracle Server's platfore (Unix or NT or other), they may employ different "Protocol". The exaxmple above uses "NMP" (meaning NamePipe, for NT Platform. Notice the "sid" in the example. This would be the ConnectString mentioned earlier.

Your best bet is to ask your Oracle DBA to mail you a copy of the tnsname.ora file that sits on the Oracle Server machine, and paste the information from there to your local tnsnames.ora file. In fact most enterprises would have a "publicly" posted tnsname.ora file that stores all the connections, which stores connection information from client to server, and from server to server.

3. Set up your 32bit ODBC Connection (Control Pannel / 32bit ODBC, but making sure to use Oracles odbc driver.

4. When you fire up VFP, you will be be able to create a Connection using the 32 bit ODBC Connection you set up in (3).

Hope this helps.

Tau
Previous
Reply
Map
View

Click here to load this message in the networking platform