ODBC and C# Error + Oracle database connection

Hi,
I am Using odbc connection to connect the database
using System.Data.Odbc;
OdbcConnection con = new OdbcConnection();
con.ConnectionString = "Dsn=MYDSN";
OdbcCommand myCommand = con.CreateCommand();
in the code i am creating the table and populating the data.
I am able to create the table,where as i am not able to insert the data
for (int i = 0; i < 2 ; i++)
myCommand.CommandText = "Insert into mytable (Col1,......) values (:param1,.......)"
myCommand.Prepare();
myCommand.Parameters.AddWithValue("?", 0);
myCommand.Parameters.AddWithValue("?", 0);
myCommand.ExecuteNonQuery();
myCommand.Parameters.Clear();
Error:
System.Data.Odbc.OdbcException
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
Where is the Problem.
Thanks!

933663 wrote:
Hi,
I am Using odbc connection to connect the database
using System.Data.Odbc;
OdbcConnection con = new OdbcConnection();
con.ConnectionString = "Dsn=MYDSN";
OdbcCommand myCommand = con.CreateCommand();
in the code i am creating the table and populating the data.
I am able to create the table,where as i am not able to insert the data
for (int i = 0; i < 2 ; i++)
myCommand.CommandText = "Insert into mytable (Col1,......) values (:param1,.......)"
myCommand.Prepare();
myCommand.Parameters.AddWithValue("?", 0);
myCommand.Parameters.AddWithValue("?", 0);
myCommand.ExecuteNonQuery();
myCommand.Parameters.Clear();
Error:
System.Data.Odbc.OdbcException
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
Where is the Problem.
Thanks!ERROR?
What Error?
I do not see any ORACLE error code & message.
How do I ask a question on the forums?
SQL and PL/SQL FAQ

Similar Messages

  • Win7 and now Server Error [2007]: "Database connection information not acce

    I support a 8.3.x server with Insight plugin in use. This has worked for some time now with WinXP. The issue comes into play when the company is upgrading users to Win7 stations. First, the zero-admin (download and install setup launch) is failing. The Install window opens but doesn't seem to be able to complete. Then, when we do get the plugin installed via the manual download and install, we then reach a point where the bqy will not connect with the Server Error [2007]: "Database connection information not accessible. Processing is disabled." If we proceed from there, we'll get Server Error [6] PUB_NullArgument errors and empty "Show Values" limit boxes. So it's like the .oce information is not received on the Win7 platform - it still works fine on WinXP installations.
    And, I know it can work, as the PC Support personnel were able to get this working on one PC.
    Any suggestions?
    Thanks,
    Keith

    I assume that there has been no reply to this thread. The problem still persists, with intermittent success. I hope that someone can shed some light onto the Server Error [2007]: "Database connection information not accessible. Processing is disables." message.
    Thanks again,
    Keith

  • Error during database connection to the database : MS SQL Server 2008 R2

    Hi All,
    I am working with ABAP Proxy to Rec JDBC( Integrating XI with MS SQL Server 2008 R2). I am using SAP PI 7.0
    I am getting error in RWB at communication channel monitoring :
    Error during database connection to the database URL 'jdbc:microsoft:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
    I have given Connection details at Rec JDBC Communication channel as :
    JDBC Driver as : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection : jdbc:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST.
    Please help me in this regard. I really appreciate your valuable information and time.
    Thanks and Regards,
    Ayub.
    Edited by: Ayubsajjid on Feb 15, 2012 8:49 AM

    Hi All,
    Thanks for all your valuable inputs on my question...
    As per all your inputs, we have to install/Deploy the below required jar files in the aii_af_jmsproviderlib.sda file
    ojdbc14.jar
    msbase.jar
    mssqlserver.jar
    msutil.jar
    Can you please tell me from where we will exact this .jar file, bcoz we have search lotzz but we helpless.
    We install from this link http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21599--> we download sqljdbc_3.0.1301.101_enu  file >sqljdbc_3.0>enu-->in that I find sqljdbc.jar and sqljdbc4.jar files only . I cant above said .jar files.
    Please help me.
    Regards,
    Ayub.

  • Problem in Oracle Database Connectivity in JSP

    I am having big problem such as Oracle Database connectivity problem
    Following code i am used for database connection. but it throw an exception call class not found exception.
    Pls any one can help me. With a sample code for Oracle Database connection in JSP
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    String url="jdbc:oracle:thin:@172.25.44.54:1521:bbo";
    con = DriverManager.getConnection(url,"user", "user123");
    Thank you

    Well i've never used oracle or their drivers before but i'm presuming that you'd go to oracle.com or something and look for downloads. Otherwise you could goodle for Oracle JDBC drivers. Then just follow the instructions.
    Again i've never used JSP but if you have a manifest file somewhere you'll need to put a class-path: entry in their referecning the jar file with the driver so that it is availble at run-time.
    Wes

  • NetBean, I can't establish the oracle database connection with version 9i.

    In NetBean, I can't establish the oracle database connection with version 9i.
    I have create the datasource and it is fine.
    when i try to access the tables i get a message
    "Unable to refresh children, connection is broken, unsupported feature"
    in netbeans.
    Does netbeans support oracle 9i version.
    Thanks,
    VKK

    In NetBean, I can't establish the oracle database connection with version 9i.
    I have create the datasource and it is fine.
    when i try to access the tables i get a message
    "Unable to refresh children, connection is broken, unsupported feature"
    in netbeans.
    Does netbeans support oracle 9i version.
    Thanks,
    VKK

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • Error during database connection (JDBC)

    Hello!
    When I try testing my connection to MSSQL (using sender JDBC channel) in communication channel monitoring (RWB)i can read that Error explanation:
    Error during database connection to the database URL 'jdbc:microsoftsqlserver://<DB_IP_ADRESS>:1433;databaseName=XXXX' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Unable to locate a suitable JDBC driver to establish a connection to URL 'jdbc:microsoftsqlserver://<DB_IP_ADRESS>:1433;databaseName=XXXX''
    Before I did the communication channel configuration I did the driver instalation and deploy like in document "HowTo_ConfigExtAdapters". In Adapter Monitor (RWB) i can see the JDBC adapter instaled and started (gray square).
    Any idea what is wrong?

    hi,
    try this:
    jdbc:microsoft:sqlserver://
    and not
    jdbc:microsoftsqlserver
    Regards,
    michal

  • Difference between upgrdae and migration about oracle database

    Difference between upgrdae and migration about oracle database
    please give the comments

    Well, the question is almost philosophic...<br>
    In 9i, there is a Migration Guide whereas in 10g there is a Upgrade Guide.<br>
    Furthermore, in 9i, there is the command line startup migrate whereas in 10g that's startup upgrade.
    Somebody think upgrade when go to new release, and migration when go to new version.<br>
    Others think upgrade when new version replace database in place, and migration when new version include a move of database.<br>
    Another point of view is : upgrade is for technical, and migration for application/data.<br>
    <br>
    Well, after these explanations, your upgrade/migratation notion will not be more clear, but I think that is not very important, only a terminology game. The most important is to know what you need : new version or new release.<br>
    <br>
    Nicolas.

  • Convert flat file to XML document and store into Oracle database

    First:
    I have a flatfile and created external table to read that file in Oracle
    Now I want to create an XML document for each row and insert into Oracle database, I think that XMLtype.
    Could you please provide me some information/steps.
    Second:
    Is there performance issues, because everyday I need to check that XML document stored in the database against the in coming file.
    Thank You.

    Oracle 11g R2 Sun Solaris
    Flat file is | (pipe delimited), so I did create an EXTERNAL Table
    row1     a|1|2|3|4
    row2     b|2|3|4|5
    row3     c|6|7|8|9
    I want to store each record as XML document. So it will be easy to compare with next day's load and make insert or update.
    The reason is:
         First day the file comes with 5 columns
         after some days, the file may carry on some additional columns more than 5
         In this case I do not want to alter table to capture those values, if I use XML than I can capture any number of columns, CORRECT!. Please make me correct If I am wrong.
         This is the only reason to try to use the XMLType (XML Document)
         On Everyday load we will be matching these XML documents and update it if there is any column's value changes
    daily average load will be 10 millions and initial setup will be 60-80 millions
         Do I have anyother option to capture the new values without altering the table.
    Please advise!.

  • When and How to close database connection in JSP?

    Hi there,
    I am using MySQL and JDBC 3.0, in my system, When and How to close database connection in JSP?
    Thanks in advance.
    Lonely Wolf
    <%@ page session="true" language="java" %>
    <jsp:include page="checkauthorization.jsp" />
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%--
    Execute query, with wildcard characters added to the
    parameter values used in the search criteria
    --%>
    <sql:query var="availablecomputerList" dataSource="jdbc/Bookingcomputer" scope="request">
    SELECT * FROM computer where status=0
    order by s_code
    </sql:query>
    <html>
    <head>
    <title>Search Result</title>
    </head>
    <body bgcolor="white">
    <center>
    <form action="checkin.jsp" method="post">
    <input type="submit" value="Back to Check-in Page">
    </form>
    <c:choose>
    <c:when test="${availablecomputerList.rowCount == 0}">
    Sorry, no available computer found.
    </c:when>
    <c:otherwise>
    The following available computers were found:
    <table border="1">
    <th>Computer</th>
    <th>Description</th>
    <th>Status</th>
    <c:forEach items="${availablecomputerList.rows}" var="row">
    <tr>
    <td><c:out value="${row.s_code}" /></td>
    <td><c:out value="${row.description}" /></td>
    <td><c:out value="${row.status}" /></td>
    </tr>
    </c:forEach>
    </table>
    </c:otherwise>
    </c:choose>
    </center>
    </body>
    </html>

    when should you close the connection? when you're done with it.
    how should you close the connection? like this: conn.close();
    that said, doing this in a JSP page is bad form and not recommended
    JSP's typically don't contain ANY business or data logic

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • ODI topology connection error - oracle database

    Hi,
    I'm trying to connect to oracle database installed on a remote server through odi client installed on my windows machine. Oracle db is on RHEL 64 bit, I believe. I know the connection details such as hostname, sid etc but i'm not able to establish a connection using the oracle jdbc driver. I can perfectly connect to the db via sqldeveloper using tnsnames and also basic connection which rules out the possibility that i might be giving incorrect SID name in ODI connection since I'm using the same details for both
    Error which i received is:
    java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1125)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:163)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$4(SnpsDialogTestConnet.java:159)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$4.doInBackground(SnpsDialogTestConnet.java:519)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$4.doInBackground(SnpsDialogTestConnet.java:1)
         at oracle.odi.ui.framework.AbsUIRunnableTask.run(AbsUIRunnableTask.java:258)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter.getConnection(OnConnectOnDisconnectDataSourceAdapter.java:74)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:217)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         ... 1 more
    Caused by: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:482)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:678)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:238)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:410)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:386)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:353)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:332)
         ... 7 more
    Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
         at oracle.net.ns.NSProtocol.connect(NSProtocol.java:411)
         at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1222)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:330)
         ... 15 more

    tnsping works fine. To solve the problem, I changed my JDBC connection string to another format which uses connect description with service name and that solved the problem. This is what I used.
    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP)(HOST=) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=)))

  • Oracle 10G and UCCX 5.0 Database Connection return 0 rows on query

    Currently I have an issue with UCCX 5.0 and Oracle 10G, we need to access a table on an Oracle10G DB, form IP IVR, so I installed the driver, created the ODBC connection and declared the ODBC, user and password on the Database subsystem (name on UCCX match the ODBC name) and restarted the engine.
    Im trying to do simple select statement (SELECT * FROM TABLE) and I'm getting a 0 count once I test it.

    Hi,
    I see it has been a while since you posted this question, but I am having exactly the same problem with an Oracle integration and I was wondering if you were able to fix this and how.
    Your reply will be greatly appreciated.
    Regards,
    Eduardo

  • Unsatisfied link error for oracle database connection

    Hi all,
    I am tryin to establing connection to the oracle database through weblogic 6.1.
    the connection starts normally and then it gives me an error stating that weblogicoci37
    is not found in the java library path. I tried to find it out in the weblogic
    directory but managed to find out some files with ...oci36. Am doing something
    weird!!
    I am sure i downloaded the correct driver. My OS is NT and webserver 6.1 and the
    jdriver is ocirel510sp11 package for oracle. Would be great to have some suggestions!
    i have listed the error below.
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    no we
    blogicoci37 in java.library.path
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)

    found the error, i forgot to add the oci817_8 folder from the weblogic bin directory
    in the path.
    "arif" <[email protected]> wrote:
    >
    Hi all,
    I am tryin to establing connection to the oracle database through weblogic
    6.1.
    the connection starts normally and then it gives me an error stating
    that weblogicoci37
    is not found in the java library path. I tried to find it out in the
    weblogic
    directory but managed to find out some files with ...oci36. Am doing
    something
    weird!!
    I am sure i downloaded the correct driver. My OS is NT and webserver
    6.1 and the
    jdriver is ocirel510sp11 package for oracle. Would be great to have
    some suggestions!
    i have listed the error below.
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
    no we
    blogicoci37 in java.library.path
    at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)

  • Oracle database connectivity using oledb provider and atl classes in c++

    dear friend ,
    i m connecting oracle database in c++. i m using ATL classes and oledb provider for oracle. however i m facing some defficulties in stored procedure.
    Normally MYSQL and sql server database is resulting result set in stored procedure i.e. we can use " select * from tablename" query in c++ to returning result. but in oracle we can not use this approch as because it dosent support. so how can i execute below stored procedure in c++ code. i have to retuen result set in STP. i m using SYS_REFCURSER in oracle . but how do i execute it in c++ code.
    create PROCEDURE stp_getRecord ( p_curser SYS_REFCURSER) as
    begin
    open p_curser for select * from table_name;
    end;
    please help me asap.

    I tried it, commented out the reader.read and have the following connection string
    string connectionString = "provider=ORAOLEDB.ORACLE; data source=ORCL; password=****; user id=****; OLEDB.NET=True"
    Unfortunately the result is the same.
    Edited by: Dino2dy on Nov 24, 2011 12:53 AM

Maybe you are looking for

  • Hard Disc Not Exist

    To start at the beginning; Just under 3 years ago, my ex wife bought my daughter (then 12) an HP G56-105SA. A year ago my daughter moved back in with me, and brought it with her. Just the lap-top and power supply. No Recovery discs; no manuals; just

  • Return to vendor through OBD

    Hi Experts, For return to vendor process, we are creating return goods receipt using movement type 122 and at that time in back ground out bound delivery is creating. Kindly tell me next what steps need to be followed for excise related things and cr

  • Can we create a table in temp tablespace?

    Hi Support , I have confused about on point that Can we create a table in temp tablespace. thanks

  • Three questions...related sharing,updating etc

    Sir! I have more than one questions...please solve them 1>I connected my iPad with windows 8 PC through USB wire but I am unable to transfer the matters frm PC to my iPad model A1455.. 2>I want to update my ios 6 with ios7..but in setting>general>sof

  • Getting error 107 downloading after effects. Have tried all suggested solutions

    Need assistance with downloading after effects trial as I keep getting error 107. Have tried all suggested solutions. Thanks