Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle ASP
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2010, 01:50 PM
Registered User
 
Join Date: Sep 2007
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..
 
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
 
Old February 4th, 2010, 03:41 PM
Registered User
 
Join Date: Sep 2007
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.
 
Old June 10th, 2010, 07: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?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ora-12154 on Windows 2003 Server sean_xu Oracle 2 June 15th, 2007 02:04 AM
DBLink ORA-12154 nkrust Oracle 2 May 20th, 2007 11:54 PM
ORA-14100 auxiora_nemesis Oracle 0 April 6th, 2007 04: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 05:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.