passing parameters while connecting to Oracle

Tags:
Oracle
Oracle error messages
We connect a large database about 2000 records of college students details our problem is while retrieving last record in the database.First,next and previous are working. Our exception is as follows:An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll Additional information: Cast from type 'DBNull' to type 'String' is not valid.

Answer Wiki

Thanks. We'll let you know when a new response is added.

That’s actually a .NET error not an Oracle error. Basically the database is returning a null value to you and .NET doesn’t want to put it into the string variable you are using.

Try setting the variable to nothing then using the IsDBNull to see if the value it null. If it is do nothing, if it’s not then put the value into the variable.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following