Error connecting Visual C# app to Oracle database
I'm trying to write a simple web form that will display some info from an Oracle 9 database.
I've downloaded the ODP for .net (the 10g version) and this allows me to set up an OracleDataProvider. However, when I try to configure this I get the following error message:
"The connection could not be opened because of the following error: ORA-12154: TNS:could not resolve the connect identifier specified
I've then tried to use the OleDbAdapter, and while I can configure this to point to my database (and when I bind the datagrid I see all the column names from the table that I'm querying) when I try to view the web form and see the data that I want I get an unspecified Oracle error.
Do I need to install anything on the Oracle database to make this work? Does that fact that I'm using the 10g ODP mean that this won't work?
Most likely, your connection string does not match an entry in your tnsnames.ora file.
Your connection string should look somewhat like this:
dsn=oracle_service_name;user id=userid;password=password;
You could also place your tnsnames entry in the dsn field.
Similar Messages
-
"Error while accessing porting layer for ORACLE database via getSessionId()
Hi,
My ejb3.0 Entity is created from Emp table in scott/tiger schema of an Oracle 10g database. I am guessing I made some mistake creating the datasource or uploading the driver, because when I run my application, I get a long exception stack trace. The bottom-most entry in the stack trace is:
Caused by: com.sap.sql.log.OpenSQLException: Error while accessing porting layer for ORACLE database via getSessionId().
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:148)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.createPooledConnection(DirectConnectionFactory.java:527)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.createDirectPooledConnection(DirectConnectionFactory.java:158)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.createDirectPooledConnection(DirectConnectionFactory.java:118)
at com.sap.sql.connect.factory.PooledConnectionFactory.createPooledConnection(PooledConnectionFactory.java:119)
at com.sap.sql.connect.factory.DriverPooledConnectionFactory.getPooledConnection(DriverPooledConnectionFactory.java:38)
at com.sap.sql.connect.datasource.DBDataSourceImpl.createPooledConnection(DBDataSourceImpl.java:685)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.matchPool(DBDataSourcePoolImpl.java:1081)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.matchPooledConnection(DBDataSourcePoolImpl.java:919)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.getConnection(DBDataSourcePoolImpl.java:67)
at com.sap.engine.core.database.impl.DatabaseDataSourceImpl.getConnection(DatabaseDataSourceImpl.java:36)
at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:123)
... 90 moreActually, now (after the GRANT described in my reply before) the Exception has changed to:
Caused by: com.sap.sql.log.OpenSQLException: Error while
accessing porting layer for ORACLE database via
<b>getDatabaseHost</b>().
at com.sap.sql.log.Syslog.createAndLogOpenSQLException
(Syslog.java:148)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.
createPooledConnection(DirectConnectionFactory.java:527)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.
createDirectPooledConnection(DirectConnectionFactory.java:158)
at com.sap.sql.jdbc.direct.DirectConnectionFactory.
createDirectPooledConnection(DirectConnectionFactory.java:118)
at com.sap.sql.connect.factory.PooledConnectionFactory.
createPooledConnection(PooledConnectionFactory.java:119)
at com.sap.sql.connect.factory.DriverPooledConnectionFactory.
getPooledConnection(DriverPooledConnectionFactory.java:38)
at com.sap.sql.connect.datasource.DBDataSourceImpl.
createPooledConnection(DBDataSourceImpl.java:685)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
matchPool(DBDataSourcePoolImpl.java:1081)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
matchPooledConnection(DBDataSourcePoolImpl.java:919)
at com.sap.sql.connect.datasource.DBDataSourcePoolImpl.
getConnection(DBDataSourcePoolImpl.java:67)
at com.sap.engine.core.database.impl.DatabaseDataSourceImpl.
getConnection(DatabaseDataSourceImpl.java:36)
at com.sap.engine.services.dbpool.spi.
ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:123)
... 90 more -
Connect from VB APP to Oracle 9i
We had VB app that was connected to Oracle 8i.
We had Our Forms C/S app running on the users machine.
I downloded ODBC drivers for Oracle and was able to connect the VB APP to Oracle 8i.
Now we have forms 10g and so there is no SQL NET installed on the users machine.
How do I make the VB APP talk to the databse.
I tried installing only SQL NET from Forms 10g CD and it had no custom install. Either its all or none.
Any input will be greatly appreciated.Forms 6i is the last release that has client/server runtime suopport. Oatch 16 is certified against an Oracle 10g database.
Frank -
[b]Unable to connect a Jdbc Program to Oracle database.[/b]
Hi all,
i am able to access Oracle database from server to my machine(client) without any connectivity of java.now,I am trying to connect my java program to Oracle database. i have no idea about any other driver.when i am trying to execute this code then it is showing fatal error: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
my code is here.if anyone is having idea then plz sort out it.
Thanks n Regards,
Abhi
class Jdbc{ public static void main (String args [])throws SQLException, IOException{
System.out.println ("Loading Oracle driver...");
try {
Class.forName ("sun.jdbc.odbc.JdbcOdbc");
System.out.println("Driver Loaded!");}
catch (ClassNotFoundException e) {
System.out.println ("Could not load the driver");
e.printStackTrace (); }
System.out.println ("Connecting to the Oracle database...");
String url = "Jdbc:Odbc:[email protected]:1521:rf","scott","tiger"
//10.10.0.78 is oracle server IP address and rf is oracle instance.
Connection conn = DriverManager.getConnection(url);Hi all,
i am able to access Oracle database from server to my
machine(client) without any connectivity of
java.now,I am trying to connect my java program to
Oracle database. i have no idea about any other
driver.when i am trying to execute this code then it
is showing fatal error: java.sql.SQLException: No
suitable driver
at java.sql.DriverManager.getConnection(Unknown
n Source)
my code is here.if anyone is having idea then plz
sort out it.
Thanks n Regards,
Abhi
class Jdbc{ public static void main (String args
[])throws SQLException, IOException{
System.out.println ("Loading Oracle driver...");
try {
Class.forName ("sun.jdbc.odbc.JdbcOdbc");
System.out.println("Driver Loaded!");}
catch (ClassNotFoundException e) {
System.out.println ("Could not load the driver");
e.printStackTrace (); }
System.out.println ("Connecting to the Oracle
database...");
String url =
"Jdbc:Odbc:[email protected]:1521:rf","scott","tiger"
//10.10.0.78 is oracle server IP address and rf is
oracle instance.
Connection conn = DriverManager.getConnection(url);
Hi , I dont know if u got the answer but couple of things i wanted to let u know.
1. the driver u r using make it a thin driver as u r specifying that in the url .
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/winsoft.html
loading class 'oracle.jdbc.driver.OracleDriver'
and url u have to change a little, this depends on the driver u use.
"jdbc:oracle:thin:@balrog:1521:testJdbc"
Regards,
Lakshmi Narayana
/********************* the code which i have tested **************************/
public class Jdbc {
* @param args
public static void main(String[] args) throws SQLException, IOException{
System.out.println ("Loading Oracle driver...");
try {
Class.forName ("oracle.jdbc.driver.OracleDriver");
System.out.println("Driver Loaded!");}
catch (ClassNotFoundException e) {
System.out.println ("Could not load the driver");
e.printStackTrace (); }
System.out.println ("Connecting to the Oracle database...");
String url = "\"Jdbc:Odbc:[email protected]:1521:rf\",\"scott\",\"tiger\"";
// 10.10.0.78 is oracle server IP address and rf is oracle instance.
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@balrog:1521:testJdbc","ispsapp","ispsappbalrog");
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from BC_PMT_APPLN");
if (rs.next()){
System.out.println("Column Count ="+rs.getMetaData().getColumnCount());
} -
I'm trying to pull data from an Oracle database using SSIS. When I try to select a few fields from the source table, it returns the following error message:
[OLE DB Source [47]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80040E14 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
The source columns are a combination of numeric and texts, and I've also tried selecting one of them, which didn't work. I'm using the Oracle client 11.2.0.1, and it works fine with any other data sources I have connected to so far. How can I resolve this
error?Hi H.James,
According to your description, the issue is a non-numeric character was found where a numeric was expected while pulling data from an Oracle database in SSIS.
Based on the error message, the issue should be you are comparing a number column to a non-number column in a query. Such as the query below (ConfID is a number, Sdate is a date):
where C.ConfID in (select C.Sdate
from Conference_C C
where C.Sdate < '1-July-12')
Besides, a default behavior for the Oracle OleDb Provider that change the NLS Date Format of the session to 'YYYY-MM-DD HH24:MI:SS can also cause the issue. For more details about this issue, please refer to the following blog:
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Connection issue from sqldeveloper to Oracle Database 10g
I have installed Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 on my machine having platform Windows vista
Now i have install sqldeveloper but i am not able to connect to oracle databse.
GETTING AN ERROR Network adapter could not make it connection
after that i have tried to check listners.ora through tnsping orcl getting following result
C:\Users\Kailas>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 10.2.0.3.0 - Production on 08-APR-2
011 00:20:05
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files:
E:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = kailasLa
pi)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
TNS-12541: TNS:no listener
Please let me know What should i do i want to start my practice sessions on sqldeveloper
I am new in Oracle pl/sql development
Please guide me on this.........................SQLDeveloper 3.0 production is supplied with the thin driver 11.2.0.2
it needs 11.2.0.2 version to use thick which has a few additional features over thin.
To avoid confusion with other Oracle software you can set the ORACLE_HOME in the session you start sqldeveloper in as described below:
The version mismatch is often because SQLDeveloper is trying to use the 'thick' driver and 11.2.0.2 thick is not available,
try
thin by:
1/(uncheck Tools->preferences->Datababae->advanced->use OCI/thick driver, and
2/If necessary, set ORACLE_HOME for your cmd.exe session where sqldev is started from to where sqldeveloper is where %ORACLE_HOME%\jdbc\lib exists, (so SQLDeveloper does not try your existing ORACLE_HOME) and
3/If using connection type TNS, use Connection Type TNS -> Network Alias.
4/You may need to set Tools->preferences->Datababase->advanced->Tnsname directory to the directory containing tnsnames.ora
-Turloch
SQLDeveloper Team -
Error connecting with Few versions of Oracle
I wrote an MFC based application in Visual C++ to make the connection with Oracle Database. ADO Control is used to make connection. Following is the Connection String:
"Provider=MSDAORA;User Id=Scott;Password=Tiger;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))(CONNECT_DATA =(SID = edox)));"
I am able to connect with few versions of oracle like 8.0.5.0.0 and 9.0.1.1.1
But few versions are not accepting this connection string. Like Oracle 9i, Release 1.0.2. What could be the reason of this problem?
Another thing that noticed with 8.0.6.0.0 is that when i start the oracle service, and try to connect, it refuces connection, but next time it accepts the connection request...Another thing i noticed is if i connect the SQL+ software, it continues working. But if i close the session of sql+, my other application stops working...Strange.
-
Sun One App Server - Oracle Database 10g
Hi to all:
I�m developing a web application that uses an Oracle 10g database and a I want to use Sun One Application Server 7, the problem that I have is when I have been deployed the war file into the server and acces to my application, specifically when I try to acces a JSP that extracts data from database, I don't see anything of the information that I need, that's not the problem, the problem is that in the server console appear a message indicating that an SQLException occour and the message is "No suitable driver".
I test my methods before deploy the war file and the connection and data extraction are correct, I don't know if the version of the JDBC driver for the connection to Oracle Database 10g is incompatible or if it's impossible to use Sun One App Server 7 with a connection with Oracle 10g.
I tried with other web servers like Tomcat 5.0 and Sun Application Server 9 and the connection it's perfect.
Could somebody give some ideas or orientation please?????, im student, all help will be appreciated, thanks!!!Rahul,
Yes there is an Enterprise Edition in the works. It will address the load balancing and fail over needs for deployments. More details are available here: http://wwws.sun.com/software/products/appsrvr_ee/home_appsrvr_ee.html
We will also be releasing more information in the October and November.
Cheers,
Stefan Bolka
Product Line Manager
Sun ONE Application Server Enterprise Edition -
Error Connecting to TFS 2013 from Oracle PL/SQL using MSSCCI
Hi,
previously we were able to connect to TFS 2008 through MSSCCI.
we have MSSCCI 2013 provider, Teamexplorer 2013 andVersion Control Interface installed.
While trying to connect to TFS 2013 from ORacle PL/SQL Developer 10.5 through MSSCCI ; there is an error coming up when we enter the server url ... it is allowing us only until <tfs home url> without collection...
"The request failed with the error message
<head><title>Document moved></title></head>
<body><h1>Object Model</h1>This document may be found<aHREF=/<Collectionname>/Services/v1.0/ServerStatus.asmx>">http://<tfshome
url>/<Collectionname>/Services/v1.0/ServerStatus.asmx> But the plugin picks it up automatically.. Am i correct?
How to resolve the above error?
Thank you
SuHi Su,
Thanks for your post.
How do you manually build your PL/SQL/Oracle projects?
TFS Build invoke MSBuild command to build project/solution on build agent machine by default. If these projects can be built using MSBuild command line manually, then we can use TFS Build(default build process template) to build these projects.
If these projects need be built using another complier, and this compiler support run the command line to invoke it, so you can add the InvokeProcess activity(execute the command line) to invoke this compiler to build these projects in build process template,
then create build definition using this customized build process template.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Error connecting to a table in a database
I am trying to insert user login script and have an error.
Can anyone tell me why Dreamweaver MX 2004 cannot connect to
the tables in my databases? I am using MS Access 2002 and there are
tables in the databses.
I can supply a jpeg of the error if neededHello,
Are you using Windows XP SP2?
If so, it's a known issue.
Here's the fix:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19515&sliceId=2
Click on "connectivity fails with local ASP.NET and ASP
servers..."
There's a link to download the extension fix in "Workaround"
ASP: When using a local ASP test server running on XP SP2
with Dreamweaver
(i.e. the Testing Server URL prefix is set to "
http://localhost"), and you
specify "Using driver on testing server" or "Using DSN on
testing server,"
database connectivity fails. If you click the Test button in
the Custom
Connection String or Data Source Name (DSN) dialog box, it
says the
connection was made successfully. However, if you then try to
browse the
tables in the Databases panel or create a recordset, the
database tables do
not display or you get the following error message: "Unable
to retrieve
tables from this connection, click on the 'Define...' button
to test this
connection."
Workaround: Download and install the Dreamweaver extension
fix by Macromedia
that resolves this issue (Ref. 179021). To use this
extension, follow the
steps below. The steps below apply to both ASP.NET and ASP
sites:
1.. In Dreamweaver, go to the Files panel and choose one of
your ASP.NET
site definitions.
2.. Select Site > Advanced > Remove Connection
Scripts.
Note: If this option is grayed out, open an ASP.NET page in
Dreamweaver.
Removing the connection scripts will delete the contents of
the
_mmServerScripts folder, which is located in the testing
server folder. The
_mmServerScripts folder is hidden in Dreamweaver's Files
panel, but will be
visible if viewed with a different file browser. The
_mmServerScripts folder
consists of these three files: adojavas.inc, MMHTTPDB.asp and
MMHTTPDB.js.
The connection scripts are used by Dreamweaver to perform
remote database
connectivity when developing pages within Dreamweaver. These
script files
have no affect on your web pages during run-time (i.e. when a
visitor views
your ASP.NET pages via a web browser).
3.. Repeat steps 1-2 for each of your ASP.NET site
definitions.
4.. Quit Dreamweaver.
5.. Install the extension.
6.. Restart Dreamweaver.
7.. Go into the Files panel, select one of your ASP.NET
sites, and open an
.aspx file.
8.. Go into the Databases panel and delete your existing
database
connections. Before deleting them, make sure to open up each
connection and
write down the settings. You can open a connection by either
double-clicking
the connection name, or right-clicking the connection name
and selecting
Edit.
9.. Create a new database connection. Use the same
connection names you
had before, so any existing pages with DataSets and Server
Behaviors still
work correctly.
10.. Click the Test button in the database connection dialog
box. This
will upload the new connection scripts to the testing server.
11.. Repeat steps 7-10 for each of your Dreamweaver ASP.NET
site
definitions.
Note: This extension is compatible with Dreamweaver MX 2004
and Dreamweaver
MX. The current version of the extension is 1.0.2. Version
1.0.1 resolved a
database connectivity problem with the ASP VBScript server
model. Version
1.0.2 includes the fixes in version 1.0.1 and also resolves
compatibility
issues with Dreamweaver MX (version 6). You can see which
version of the
extension you have by opening the Extension Manager.
"ducati1" <[email protected]> wrote in
message
news:[email protected]...
>I am trying to insert user login script and have an
error.
> Can anyone tell me why Dreamweaver MX 2004 cannot
connect to the tables in
> my
> databases? I am using MS Access 2002 and there are
tables in the databses.
> I can supply a jpeg of the error if needed
>
> -
Iphone 5 Screen is Frozen Connection Timeout Error Connection to this app has timed out
I upgraded to IOS 7 just a few hours before my Iphone 5 screen froze and I cannot make changes - I have a Connection Timeout Error with Connection to this app has timed out. With Ok in blue. The screen doesn't respond, I can turn off the phone, tap OK or do anthing. Any advice on how I can reset or fix?
Check for any anti-virus or anti-spyware software you might have. Temporarily disable that to continue. Normally this is what will cause a timeout. I assume you have a good Internet connection?
-
Connecting to SAP DB from Oracle Database
Hi,
I need to connect to SAP Database which resides in AIX Server from Oracle Server resides in Windows 2003.
My Scenario is for every 15 mins I need to connect to the SAP Database and if Updates happened I need to update my Oracle Table. I need to Update the SAP Database if update is happened in Oracle Database. How do we need to proceed to achive this. We have provided with a SAP user and a Table with it.
Thanks & Regards,
Vijayaraghavan KHi,
My Scenario is for every 15 mins I need to connect to the SAP Database and if Updates happened I need to update my Oracle Table. I need to Update the SAP Database if update is happened in Oracle Database.
you need to connect to SAP DataBase and If Updates happened .. in which DB .. ?? SAP or your DB on windows
I need to update my Oracle Table .. In which DB.. ?? SAP or your DB on windows
Any how if it is related to one table in particular go for DB Links which will slove your problem, as per your requirement.
Refer : http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_admin.htm#sthref4108
- Pavan Kumar N -
Reader 9 error in Visual Studio App
I am getting an error in Visual Studio when a pdf document opened in the IE WebBrowser. The error is the common memory error: "Instruction at "0x00000x000" referenced memory... "
The error only happens in with Windows XP (not Vista) with Reader 9. It worked fine from Reader 6-8. Since Reader 9, whenever I close the application with the X, not File/Exit mind you, I get the aforementioned application error.
Has anyone come across this? I am amazed that I cannot find much on this as it happens whenever you close IE with a PDF in any app.
Any ideas of how to deal with this other than just migrating back to Reader 8?
Thanks,
GageYes, I have the exact same issue. I have submitted a bug to Adobe and downgrading to Reader 8 until this issue is fixed.
Igor -
Trying to get prior error when using deferred constaint on Oracle database
Hi Greg,
There is no direct way to retrieve a error as an original exception
is wrapped. Also, it's problematic to report constraint violations
in general as different DB vendors use different ways to report them.
You may try to correct problem by extracting text of the exception
and looking for certain string patterns using direct string parsing
or regexps.
Regards,
Slava Imeshev
"Sanjeev Chopra" <[email protected]> wrote in message
news:3d5aa128$[email protected]..
posting to ejb newsgroup
"Greg James" <[email protected]> wrote in message
news:[email protected]..
I'm using an Oracle database which has deferred constraints enabled. I'musing
Weblogic 5.1 and Java. The problem is that the deferred constraints
don't
report
errors until a commit. This makes all errors report back to the java EJBcode
as error code 2091: Transaction Rolled Back. Both errors show up in theWeblogic
log file so there must be some way for my EJB to access it. How can I
get
the
error code of the actual cause? -
Connecting Linux to Windows NT oracle Databases
Help-
I am trying to connect linux based Websites with an oracle
Database running on WinNt... I am not sure what I have to do
exactly, I know with Sybase you have to download a certain set
of Libs and Rpms, but I am not sure what the deal with oracle
is...
Thanks for the help in advance.
-Jesse Noller
nullJesse Noller (guest) wrote:
: Help-
: I am trying to connect linux based Websites with an oracle
: Database running on WinNt... I am not sure what I have to do
: exactly, I know with Sybase you have to download a certain set
: of Libs and Rpms, but I am not sure what the deal with oracle
: is...
: Thanks for the help in advance.
: -Jesse Noller
You need to install SQL*Net on the linux machines, and configure
them to talk to the server.
In turn, to get the SQL*Net client for Linux, you need to get
(download) or already have the whole database install...
Ally
null
Maybe you are looking for
-
My IMAC freezes just as I try to watch a video in FireFox
My IMAC freezes just as I try to watch a video in FireFox. and every time I must force restart to fix it... I would appreciate if somebody help me
-
How to determine installed version of EMET via script?
Hi all, I was not able to find a easy way to determine installed verison of EMET via script. If you can guide me in the right direction, this would help a lot. Many thanks Sam
-
The WindowsXP service pack2 is my operating system on the destop.
-
Hi everyone! I really hope someone can help me resolve an issue I am having. I recently upgraded to Adobe Premiere CC. I have an older mac, (Mac Pro 1,1/Processor 2 x 2.66 GHz Dual-Core Intel Xeon/13 Gigs Ram/ NVIDIA GeForce 7300 GT 25 MB (I am ch
-
Data Service Auto-Detect Return Type Error
Hello, I am not sure if I am posting in the correct area, as this is my first post in a long time. I have an error when trying to Auto-Detect Return Type for my Web Service Data Service. The error is 'Data type "Table_type" cannot be merged with