ADO.net using ODBC and oracle

From: shania (uramnath_at_hotmail.com)
Date: 05/14/04


Date: 14 May 2004 07:59:29 -0700

Hi,
  I am trying to execute a simple oracle stored procedure that has an
output parameter, using odbc and ado.net. Here is the code

    cSqlOdbcCmd = objConnect.CreateCommand()
    cSqlOdbcCmd.CommandType = CommandType.StoredProcedure
    cSqlOdbcCmd.CommandText = "packagename.Procedurename"

    cSqlOdbcCmd.Parameters.Add("outResult",
OdbcType.Numeric).Direction
                             = ParameterDirection.Output

    objConnect.Open()
    cSqlOdbcCmd.ExecuteNonQuery()

   The oracle client version is 8.05 and the server version is 8i
(release 8.1.5). I keep getting an invalid sql statement. The same
runs in vb6 ado (with similar call) just fine. I checked for
packagename and procedure name mismatches but there were none. I have
odbc set up propery along with net 8 client. Everytime it goes to the
executenonquery statement it gives an invalid sql statement error. I
also tried to execute simple text sql statments (not stored
procedures) which did not have any problems.

What could be wrong?

Thanks



Relevant Pages

  • Re: ADO.net using ODBC and oracle
    ... > odbc set up propery along with net 8 client. ... > executenonquery statement it gives an invalid sql statement error. ... > also tried to execute simple text sql statments (not stored ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Errors in stored procedure dont raise
    ... query in your ODBC application? ... execute is not enough to get an error. ... Informix CSDK Team, IBM India Software Lab, Bangalore, ... informix server. ...
    (comp.databases.informix)
  • Re: sp_setapprole with third party program using ODBC
    ... As I understand there is no place to add such a command to MS ODBC settings ... "execute sp_setapprole". ... party supplies such an option also. ...
    (microsoft.public.sqlserver.security)
  • Re: -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    ... > I'm trying to execute a stored procedure in SQL Server 2000 from a VB^ ... Data Sources (ODBC) control panel's Tracing tab. ... You may want to try using a different ODBC Driver for SQL Server, ... Universal Data Access and Virtual Database Technology Providers ...
    (microsoft.public.data.ado)
  • Re: -2147217887 [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    ... > I'm trying to execute a stored procedure in SQL Server 2000 from a VB^ ... Data Sources (ODBC) control panel's Tracing tab. ... You may want to try using a different ODBC Driver for SQL Server, ... Universal Data Access and Virtual Database Technology Providers ...
    (microsoft.public.vb.database.ado)