Passing large value to Oracle stored procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E11esar
    New Member
    • Nov 2008
    • 132

    Passing large value to Oracle stored procedure

    Hi there.

    I am writing a C# application and need to pass in a number such as

    200003141070 but I'm not sure which datatype to use here as this number is a reference number but cannot be a string value for business reasons.

    I am using the System.Data.Ora cleClient and so when adding a parameter to the stored procedure command call, I am using a line such as:

    Code:
    comm.Parameters.Add("param1", OracleType.Number).Value = largeValue;
    Where largeValue is as specified above.

    Am I right to use .Number as the type here? Also when returning a value from the respective database column, what would you say is the best primitive type to store this in, as this is too large for an Int32 and the such..?

    Thank you.

    M :o)
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    That number can easily be stored in a number type field in oracle.

    in c# you can use int64

    Comment

    Working...