1

we recently upgraded an application (.NET 2.0) that we maintain to use Oracle 11g. The application uses MS Enterprise Library 2.0. We've found that when the database.ExecuteNonQuery(Oracle.DataAccess.Client.OracleCommand) method is called, it bombs when the stored procedure expects a parameter as a number, but receives a string. This didn't happen prior to upgrading. If I cast the parameter to an Int, I don't recieve the error. Has anyone encountered this issue? Was something possible missed during the upgrade? The issue occurs regardless if we are hitting an 11g database, or a 10g database.

I apologize if this question is vague.

Thanks for the help.

EDIT: I neglected to mention that this same issue does not occur when ExecuteDataReader is called (handles implicit conversion of the datatype).

2
  • When you say "it bombs", what is "it"? Oracle? .Net? MS Enterprise Library? What is the error message, error number, call stack, etc? Commented Apr 4, 2011 at 7:15
  • An Oracle "invalid input string []" error is received. In the end, we scoured the code and corrected any parameter type mismatches. Commented Apr 13, 2011 at 16:54

1 Answer 1

2

You really should change your code such that you are passing the correct data type to the stored procedures.

Sounds like they are finally enforcing this.

Sign up to request clarification or add additional context in comments.

1 Comment

It's a big task to change the code, so that's the last resort. Plus, it doesn't seem to be consistent. In some methods, the mismatch does not cause an error, but in others, it does. Also, it doesn't seem to be a problem if it's executing db.ExecuteDataReader. Any other thoughts?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.