472,981 Members | 1,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,981 software developers and data experts.

Accessing an Oracle database with vb.net

I'm trying to access an Oracle database vb.net. I found several examples.
I tried following each one, but I get the same error no matter what I try.
I don't really understand what the error means (I've never tried accessing
an Oracle database before). The error I get is:

ORA-12514: TNS:listener does not currently know of service requested in
connect descriptor

I installed the oracle dll and added it as reference (I get the same error
if I use the Oracle reference that came with VS2003.) I figure it's hitting
the database ok since if I change the name of the database it's connecting
to, I get an error that it couldn't resove the name. Here's the code I'm
using, pretty much straight from the example on Oracle's web site:

Dim con As OracleConnection = New OracleConnection

con.ConnectionString = "User ID=scott;Password=tiger;Data Source=oracledb;"

Try

con.Open()

Catch ex As Exception

tmp = ex.Message

End Try

Naturally, I'm using different user id, password and db name in my actual
code. The program errors on the con.Open() line.

Any ideas on where to look would be greatly appreciated.

Mark


Feb 26 '07 #1
2 4026
In article <e#**************@TK2MSFTNGP03.phx.gbl>, mb****@echd.no-
spam.org says...
I'm trying to access an Oracle database vb.net. I found several examples.
I tried following each one, but I get the same error no matter what I try.
I don't really understand what the error means (I've never tried accessing
an Oracle database before). The error I get is:

ORA-12514: TNS:listener does not currently know of service requested in
connect descriptor

I installed the oracle dll and added it as reference (I get the same error
if I use the Oracle reference that came with VS2003.) I figure it's hitting
the database ok since if I change the name of the database it's connecting
to, I get an error that it couldn't resove the name.
It's been a few years since I had to deal with Oracle, but I'll give it
a shot.

First, when you say you "installed the oracle dll", does that mean you
actually installed the oracle client? If not, I would install the
oracle client and include SQL plus during the installation. SQL Plus is
a kind of isql/w (if you're familiar with SQL Server).

Once the client is installed, make sure you tnsnames.ora file is
configured correctly. This, I can't help you with since I don't
remember what is necessary, but I do recall that was a source for
frequent frustration.

Third, make sure the Oracle listener service is running on the oracle
server.

Good luck!

--
Patrick Steele
http://weblogs.asp.net/psteele
Feb 27 '07 #2
"Patrick Steele" <pa*****@mvps.orgwrote in message
news:MP************************@msnews.microsoft.c om...
In article <e#**************@TK2MSFTNGP03.phx.gbl>, mb****@echd.no-
spam.org says...
>I'm trying to access an Oracle database vb.net. I found several
examples.
I tried following each one, but I get the same error no matter what I
try.
I don't really understand what the error means (I've never tried
accessing
an Oracle database before). The error I get is:

ORA-12514: TNS:listener does not currently know of service requested in
connect descriptor

I installed the oracle dll and added it as reference (I get the same
error
if I use the Oracle reference that came with VS2003.) I figure it's
hitting
the database ok since if I change the name of the database it's
connecting
to, I get an error that it couldn't resove the name.

It's been a few years since I had to deal with Oracle, but I'll give it
a shot.

First, when you say you "installed the oracle dll", does that mean you
actually installed the oracle client? If not, I would install the
oracle client and include SQL plus during the installation. SQL Plus is
a kind of isql/w (if you're familiar with SQL Server).

Once the client is installed, make sure you tnsnames.ora file is
configured correctly. This, I can't help you with since I don't
remember what is necessary, but I do recall that was a source for
frequent frustration.

Third, make sure the Oracle listener service is running on the oracle
server.

Good luck!
Thanks for the reply. I do have the client installed and I can access the
database using Query Builder. But in my application, when it tries to
connect, I get that error, which from what I've been able to find out means
that I contacted the server, but not registered with the listener. But no
one ever seems to mention how to do that.

Mark
Feb 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dan Ellis | last post by:
Hi, I've been down so many dead ends trying to get something working, so I'm really hoping someone can help out. I need to access an Oracle database running on a Windows server from Python...
1
by: majk | last post by:
hey! Im looking for a db tutoral which covers accessing a Microsoft SQL database on windows. I will be using VC++ if it matters. NO details just a basic introduction! Oracle DB access using...
4
by: dougjrs | last post by:
Good Afternoon, I have a Java stored procedure on DB2 z/OS and it is using the Type 4 JDBC driver to access an Oracle database. After I get the data from the Oracle dataabse I try to return it...
10
by: Andrea M. Segovia | last post by:
Hello, I am a newbie to Oracle databases.... We have a visualization front-end tool connected to an Oracle back-end database on a Tru64 UNIX server. We also have clients with MS access...
6
by: Jeff | last post by:
Has anyone had any luck accessing an Oracle database from a web service? I have a C# DLL with various code to query an Oracle database. If I call the methods in this DLL from a Windows Forms...
1
by: Dave | last post by:
Hi All I'm having a problem connecting to an Oracle database using C# I have a service name : "SN I have a user id :"UID I have a password : "PWD" I can find snippets of code on the web...
3
by: Pakna | last post by:
Hello, I have what may be a beginner's question regarding DB2. How does one access a remote table on a remote database via SQL? What is the command string, is there an equivalent of Oracle...
8
by: =?Utf-8?B?RGF2aWQrKw==?= | last post by:
Hi, I have been developing Web Services in VS2005. Usually I use the built in server in VS2005 to test and develop the Web Service. However I now want to make this Web Service available to...
2
by: Ken Williams | last post by:
WhenI search Internet there thousands of comments and samples for database conenction and tuning. They are all advanced and comprehesive. I didn't found a simple "Hello World" for accessing an...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.