Advertisement

06.24.2003 at 02:54PM PDT, ID: 20658873
[x]
Attachment Details

Microsoft ODBC Driver ORA-12154 could not resolve service name from VB

Asked by mjzalewski in Oracle 3rd Party Tools

Tags: odbc, oracle, driver, microsoft

I am making changes to a legacy VB 6 application. My VB code looks like this:

   Dim cn As New ADODB.Connection
   cn.CursorLocation = adUseClient
   cn.Open "DSN=MYDB"

I get the following error (although the code is working in the legacy production system)

   Run-time error '-2147467259 (80004005)':

   [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not
   resolve service name

My DSN entry (it's a System DSN, using the Microsoft ODBC Driver for Oracle) looks like this:

   Data Source Name: MYDB
   Description:      My Database
   User Name:        user/password
   Server:           DBD

My TNSNAMES.ORA file looks like this:

  DBD =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = mydb.mydomain.com)(PORT = 1521))
      )
      (CONNECT_DATA =
        (SID = DBD)
      )
    )

I am trying to run this using client version 8.1.7 on Windows 2000, and the database server has 8.1.6

I can do TNSPING DBD and it works fine.

I can connect to the database using SQL Plus without problems.

What could my problem be?
Start Free Trial
[+][-]06.25.2003 at 09:26AM PDT, ID: 8798882

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2003 at 04:54PM PDT, ID: 8801749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.25.2003 at 06:26PM PDT, ID: 8802042

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2003 at 10:45AM PDT, ID: 8807165

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2003 at 11:09AM PDT, ID: 8807324

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2003 at 11:55AM PDT, ID: 8829706

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2003 at 02:14AM PDT, ID: 8875514

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.10.2003 at 02:09PM PDT, ID: 8896755

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2003 at 09:13PM PDT, ID: 8898798

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2003 at 05:31PM PDT, ID: 8948207

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2003 at 03:17AM PDT, ID: 8957663

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2003 at 04:43AM PDT, ID: 8957800

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2003 at 03:59PM PDT, ID: 8963735

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.06.2003 at 11:35AM PDT, ID: 9093566

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2003 at 03:24PM PDT, ID: 9095279

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle 3rd Party Tools
Tags: odbc, oracle, driver, microsoft
Sign Up Now!
Solution Provided By: cdevx
Participating Experts: 4
Solution Grade: A
 
 
[+][-]08.07.2003 at 12:04PM PDT, ID: 9102511

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2003 at 07:11PM PDT, ID: 9105019

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32