Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ORA-06502: PL/SQL: numeric or value error: character string buffer too small

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

From: <deaon5_at_gmail.com>
Date: 8 Nov 2005 11:35:38 -0800
Message-ID: <1131478538.375476.117330@g14g2000cwa.googlegroups.com>


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 from
the 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US