Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle, Unix and ADO

Posted on 2002-06-25
6
Medium Priority
?
586 Views
Last Modified: 2013-11-23
I am trying to connect to an oracle database on a unix server.
I was wondering if someone could help me with the connection string.

Here is my info:
I am using vb 6 on an nt machine.
Oracle 8i database(not sure of name) on an Unix server(named woodstock)

I have the "Microsoft ODBC driver for Oracle" MSORCL32.dll installed. I think i need to download a new oracle driver but am unsure of which one.

I have never delt with Unix and am not sure if there are issues i have to deal with. I can get more info from the Oracle DBA or from the network boys, but am unsure of what questions to ask.

any help would be great.
Thanks
Pule

0
Comment
Question by:Wardy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7108276
0
 

Author Comment

by:Wardy
ID: 7111467
That is a great website and I have used it in the past.
I downloaded the OleDB Provider for Oracle from the Oracle site and installed it.
Now it tells me that
"OraOleDBpus.dll: The specifed module could not be found."

Seems like the install didn't take.  I registered the dll manually and get the same thing.

What is going on?
This should be easy.
Any help out there?
Wardy
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7111651
search for your error on Oracle site.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:thanes
ID: 7119507
Do you have the Oracle Client for 8i installed on your development machine?  If not get the client CD from your DBA or hit Oracle's download site (you will need to setup an account with them--time consuming, but free).  Also, wherever you install this application you will also need to install the Oracle Client too--not fun--along with the *.ora configuration files setup.  You may not have to setup these files if your DBA's have setup a Oracle TNS names server.

Once the Oracle Client is installed you will need to go through it's wizards to configure the tnsnames.ora and sqlnet.ora files, or you can do it manually.  These files act like an .ini file for the Oracle Client to know where the database is at, what port numbers they listen too etc.

With the wizards on the Oracle Client you should be able to test that you have a valid connection.  Your DBA's should provide you with a username/password.  Also, you can test with Oracle's SQL*plus which comes with the Oracle Client.  Once, you know you can execute a simple SQL statement with SQL*plus you will be ready to deal with OLEDB or ODBC--whichever you prefer.  I prefer OLEDB because there is a simple "build" connection string wizard that comes with it where you can test the connection before you bother trying to write any VB code.

Good luck!
0
 
LVL 1

Accepted Solution

by:
thanes earned 1800 total points
ID: 7119514
Basically, the steps are the following:

1. Install the Oracle Client on development machines and all other machines where this application will run.

2. Networking...there are many questions to ask here!  You may have a manually maintained IP network where all of your IP address to IP hostnames are stored in a local host file?  Or you may have DHCP for assigning addresses and a DNS server that resolves the IP address to IP hostname?  Or maybe you don't use IP?  Maybe your running on some old Netware 2.x / 3.x environment?  But if you can successfully ping your Unix box then you are likely going to be able to go to the next step just fine.  If not start getting your LAN guys to help with the pinging.

3. Determine if DBA's have a TNS names server.  If not you will need to find out the database name, username, password for all schemas you will be need to user.  Then configure the tnsnames.ora and sqlnet.ora files accordingly.  There is usually some instructions in the comments of these two files.  They are found in the Oracle install path of your local machine from the Oracle Client installation.

4. Test that you have a valid connection that works using SQL*Plus.  SQL*plus is usually installed when you install the Oracle Client.  Do a simple SELECT against a table once you get connected with SQL*plus.

5. Make sure you are using MDAC 2.6 or greater (2.5 may work fine too, but I can guarantee no problems with 2.6 and Oracle 8i from my experience).

6. Within VB 6 (Enterprise I hope) drop in the Project|References and select "Microsoft ADO 2.6 library" for enabling ADO.  Finally, write your code:

    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    rs.open "select * from employees", "...oracle connection stuff..."

7. To get the exact syntax of the Oracle connection you need here I would add the Project|Components and find the ADO connection component and drop it on your form and use its wizard to build an "OLEDB connection for Oracle".  This will allow you to test the connection before you spend more time spinning your wheels writing code until you know you can really see the database from within VB.

Regards, Thane Schaffer

 
0
 

Author Comment

by:Wardy
ID: 7121983
Great answer.
I found a lot of this out on my own.  I have been able to connect to the database.  I downloaded an oracle oledb driver and client and had to talk to my DBA about the tsnames.ora file and the database name. I am running MDAC 2.5 and might download 2.6 just to be sure.

If i had anymore points I would increase the award for this question. You deserve it.
Thanks
Wardy.

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question