Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle ASP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 2nd, 2010, 01:50 PM
Registered User
 
Join Date: Sep 2007
Location: Boulder, CO, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ora-12154 problem

I have two vb.net 2.0 winforms applications, A and B. A currently talks to a remote Oracle database just fine, B needs to talk to a different database, but from the same host.

Should be easy! Update tnsnames.ora for the new db, copy some code from A to B, change the connection and query, off we go.

The problem is, I can't get B to connect to anything. It always gives the old ora-12154 error that it can't resolve the connect identifier when I try the Open() method on the OracleConnection object.

Everything else on my dev machine is able to talk to B's database: tnsping, sql plus client, even copy-and-pasting the connection string into app A and watching it successfully perform the open via VS debugging.

I've also tried copying A's connection (which I know works) to B. B fails to resolve the identifer with the same exception.

So, from my testing, I believe I've validated:
  • the tnsnames.ora file (A, tnsping, and sql plus* can connect)
  • the connection string (given the same string, A can connect)
I just can't track down whatever was done in A to make it properly talk to the remote databases (or what was done in B to disallow that).

I've also checked the path environment variable to ensure I have a path to the oracle client, and given everyone full access to all tnsnames files on my box, just in case it was a weird permission issue. Also tried re-booting, thinking maybe B had cached the tnsnames file. Nothing.

Here's how I'm trying to connect:
Code:
Dim conn As OracleConnection = Nothing
conn = New OracleConnection("Data Source=xxx.WORLD;User Id=xxx;Password=xxx;")
conn.Open()
As I said, I've validated the connection string by copying it into A and seeing that connect properly. Now I'm just looking for ideas what might be B's problem.

Last edited by golddog; February 2nd, 2010 at 01:55 PM.
Reply With Quote
  #2 (permalink)  
Old February 2nd, 2010, 03:30 PM
Registered User
 
Join Date: Dec 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not extremely familiar with this type of db instancing, but comparing your code to a technical doc from Oracle, it appears to be a syntax issue.

http://www.oracle.com/technology/pub...cook-vs08.html
Reply With Quote
  #3 (permalink)  
Old February 4th, 2010, 03:41 PM
Registered User
 
Join Date: Sep 2007
Location: Boulder, CO, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope. Thaks for the link and idea, though. Here's what it was.

I found a link somewhere (unfortunately, I've lost track of it and can't give the person proper acknowledgement) which alluded to the OracleConnection not working if you had special characters in the path.

In Team Foundation Server, our application was housed in a folder called <appName> (<dbName>).

Created a new folder w/o parens, re-created the app over there, and voilla! the connection starts working.

Nice implementation of the Connection, and for TFS not allowing me to just rename the app's folder. Sigh.
Reply With Quote
  #4 (permalink)  
Old June 10th, 2010, 08:32 AM
Registered User
 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default boolean type in oracle

asp.net using nhibernet connect oracle to store the boolean expression, how is it?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ora-12154 on Windows 2003 Server sean_xu Oracle 2 June 15th, 2007 03:04 AM
DBLink ORA-12154 nkrust Oracle 2 May 21st, 2007 12:54 AM
ORA-14100 auxiora_nemesis Oracle 0 April 6th, 2007 05:25 AM
[Oracle][ODBC][Ora][ORA-01013 Corey Access 1 December 15th, 2006 10:29 AM
ORA-01006 ahrv Java Databases 1 September 20th, 2003 06:45 PM



All times are GMT -4. The time now is 01:46 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.