Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Null value to oracle stored procedure

Status
Not open for further replies.

DannyTmoov2

IS-IT--Management
Jan 7, 2003
49
GB
want to execute an oracle stored procedure sending parameters based on some vb.net form object values, which, if they are Nothing or "" (empty strings) then send the value Null to the procedure.

executing the procedure from oracle works fine using null for parameters, and executing the procedure from vb.net WITH valid values for parameters works fine, the problem is when i try to send a null value or exclude the parameter from VB i get the error:

An unhandled exception of type 'System.Exception' occurred in system.data.oracleclient.dll

Additional information: Parameter 'i_order_no': No size set for variable length data type: String.

That is using DBNull or DBNull.value as the parameter.

Any help much appreciated
 
Let's see your code.

__________________________________________
Try forum1391 for lively discussions
 
Also, have you tried:

param.Value = DBNull.Value

__________________________________________
Try forum1391 for lively discussions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top