Results 1 to 3 of 3

Thread: Oracle connection error

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Angry Oracle connection error

    Hi,

    I am trying to connect to an oracle database using code from my .net application, but I keep getting the error "TNS cannot resolve service name". I can connect to the database using all my other tools and the .net ide even connects to the database using the server tool bar. The connection string I am using is
    "Data Source=[tns];user id=[user];password=[pword]"
    where [tns] is the tns name; [user] is the user name and [pword] is the password.

    I thought it was just my connection string that was incorrect, but then I tried using the OO4O objects which dont use connection strings and this returns the same error. If I run the same code from vb6, it connects no problem.....

    HELP PLEASE!

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Ok guys.... After much frustration, I found the solution. Your application can not be running from a folder path that contains the round brackes "()". For some reason, those guys cause a problem when you try to connect to Oracle.

    Real weird!! This doesnt happen when connecting from VB6. It only happens from .NET, even if you are using COM objects for db connection.

  3. #3
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Exclamation

    I get the same thing. How strange. Thanks for the heads up.
    ~Peter


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width