ODP.net - ExecuteNonQuery StoredProcedure CommandText with param error [ORA-06550: line 1, column 7: PLS-00801: internal error] RRS feed

  • Question

  • I have a project where I used to invoke stored procedures passing their parameter as part of the command text.

    I recently updated the db provider from the Microsoft OLE DB provider for Oracle to the ODP.net and it doesn't allow me to do this anymore, I receive the error displayed at the bottom of this message.

    I know I can use cmd.parameters but I have so many systems that current integrate with my module that only pass me the commandtext to be invoked with params embedded on it.

    Is this still possible in anyway? Want to keep the call to my stored procedure with params on a single string to be passed as commandtext.


    --- A sample of the code I used to have --------

    Dim cmd As OracleCommand = con.CreateCommand()
    Dim myParam As String = "100"
    cmd.CommandText = "test_pkg.my_func(" & myParam & ")"
    cmd.CommandType = CommandType.StoredProcedure

    --- The error I receive ------------------------

    ORA-06550: line 1, column 7:
    PLS-00801: internal error [22503]
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    • Moved by Fred Bao Wednesday, March 19, 2014 1:32 AM Oracle Related
    Tuesday, March 11, 2014 11:16 PM

All replies

  • I don't know that that syntax is supported in ODP.NET. Why not use Command Parameters instead?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, March 12, 2014 10:25 PM