Link to home
Start Free TrialLog in
Avatar of hstein
hstein

asked on

Help with connection to Oracle

Our company has been using Oracle (version 7.3) on a Unix Platform (sun) with an old 4GL language through a telenet session providing a character based application.  I want to move toward a different front end and am thinking VB is the answer using ActiveX.  Unfortunately I am having trouble connecting to the Oracle database.  I have installed Oracle Net and tried setting up a System DSN using Microsoft ODBC Driver for Oracle, but am not sure if I set it up correctly.   I have filled it out as follows: Data Source Name - MYDEV (this is the alias is used in setting up Oracle Net), Description MY DEV, User name dev (this is the the name of my Oracle Database), Connect string sun1 (Wasn't sure what to put here.  This is the system name that Oracle resides on).  When I try and use Oracle NetTest to see if I am connected it always fails. Any help would be appreciated.

Thanks

HS
Avatar of AzraSound
AzraSound
Flag of United States of America image

perhaps an easy way to try and connect would be to stick an ado data control on your form, go to its properties window, click custom, and try to build the connection to a particular database from there.  it allows, after you have gone through a few steps, to test your connection.  just click on projects -> components and check off the microsoft ado data control box and stick it on your form.  
Avatar of hstein
hstein

ASKER

Thanks for the suggestion. I tried, but am still getting an error connecting.  I clicked on connection string, clicked on build, selected Microsoft OLE DB Provider for Oracle, clicked on next, entered the server name - sun1 (this is where it seems confusing to me.  The only way for sun1 to resolve itself is using tcp/ip and yet I created an alias in oracle net named MYDEV).  Then I entered user name and password and clicked Test Connection.  I received the following error: Test connection failed because of an error in initializing provider. ORA-1254: TNS: could not resolve service name.

When I entered my alias instead (MYDEV) I received the following error: Test connection failed because of an error in initialzing provider. ORA-01017: invalid username/password:login denied (I have verified that my login and password work in my telenet session).


HS
Avatar of hstein

ASKER

I read the article.  I am running on an windows 95 system as are most of the clients in my organization.  I was hoping that when the VB program was completed using ADO I could compile and roll it out without having to setup each PC.  Isn't it possible to connect to Oracle on the '95 platform.  

HS
Hi hstein,

Just try this ..actually what I feel
is that if you want to use ADO no need of ODBC.
Install your Oracle client on your machine.In this it will ask for the ip address of the server.
once a client is installed you will have 2 thnings with you
1) UserName ==one which you made while installing Client
2) password

Use these 2 things in the Connect string of ADO.
WHere you will need to enter username and password
yes in that case when you go to build the string with the adodc, forego the server entry and just try a username/password entry
Avatar of hstein

ASKER

Maybe I don't have the right Oracle program.  I used Oracle Net Easy Configuration.  This doesn't require a user name or password, just the tcp/ip connection, an alias name,  and the Database instance.  

Hs
ASKER CERTIFIED SOLUTION
Avatar of karlww
karlww

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you established the relationship between your computer and the instance names on your server?  With NT/98/95 there is a utility called easyconfig that creates a relationship with the TNSNAMES.ORA file.  Unless this relationship is created no ODBC will be able to resolve the connection.
Avatar of hstein

ASKER

I can't get the connection to work.  Maybe I have the wrong Oracle net client - Oracle Net8 Easy Config.  When I open it and pick TCP/IP , then enter the IP address and keep the port number at 1521 (the default), then enter the SID which is DEV.  When I press test and enter login/password I get the following message:The test did not succeed. ORA-01017: invalid username/password; logon denied.  I know my name and  password are valid as I login using a telenet session.

Any ideas?

Thanks

Hs
Does SQL*Plus even work from your computer?  It sounds like lkey is right.  You've got to get the Oracle networking configured before VB even has a chance.
Avatar of hstein

ASKER

Adjusted points from 75 to 150
Avatar of hstein

ASKER

I can't seem to connect.  Is there a different version of SQL *Net I should be using.  My Oracle version is 7.3.  Could this be causing the problem?
Have you checked that your client computer can 'see' the server?

Try opening a DOS command prompt and typing in 'PING sun1'.  (Assuming sun1 is the Oracle server name).

Hopefully this will return that it was able to ping the server.  If it has not then you need to check your TCP/IP configuration.

Otherwise, I do not know what groups are available here, but as the others have said - your problem is not with Visual Basic, you have a networking/Oracle connection problem.
Avatar of hstein

ASKER

Thank you all.  I have made the connection!! It did turn out to be a problem with the Sun1.  I will be asking that all the points be split among all those that answered.

Thanks
Reveiwing question.

darinw
Community Support has reduced points from 150 to 30
Reducing points to 30 to allow for split.

hstein - You can now accept the proposed answer to award the first Expert. To award the other Experts, you can create new questions in this topic area with a title of 'For ExpertName -- 10338168' using the appropriate Experts username.

Remember, the Accept Comment as Answer button is in the header of the comment.

For your convenience, you can use this link to create the new question (right click and open in a new window):
https://www.experts-exchange.com/bin/NewQForm?ta=31

darinw
Customer Service