Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I get the following message: "ORA-06502: PL/SQL: numeric or value
error: character string buffer too small" when I run the following
code.
Dim cmd As New OracleCommand Dim FunctionResult As String 'Result to be passed back Dim ReturnResult As New OracleParameter 'Result obtained fromthe function
cmd.CommandText = "blkbrd.next_library_barcode" cmd.Connection = con cmd.CommandType = CommandType.StoredProcedure
'Create parameter information
ReturnResult.ParameterName = "library_barcode_plus_check_dig" ReturnResult.Direction = ParameterDirection.ReturnValue ReturnResult.OracleDbType = OracleDbType.Varchar2.Varchar2
'Add parameter to command
cmd.Parameters.Add(ReturnResult) con.Open() Try cmd.ExecuteNonQuery() FunctionResult = cmd.Parameters("myResult").Value Catch ex As Exception Throw Finally con.Close() End Try
Has anyone else encountered this problem when trying to get a return value from a function in vb.net? Received on Tue Nov 08 2005 - 13:35:38 CST