Sql Code = -311

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vimala Alagarsamy
    New Member
    • Jul 2008
    • 1

    Sql Code = -311

    I m getting an sqlcode of -311 while performing multi-row insert.The sql works for a single row but does not work for multiple rows.How to solve this?
  • spider007
    New Member
    • Jan 2007
    • 27

    #2
    What is the SQl that you are executing?

    SQL0311N The length of string host variable number "<var-number>" is
    negative or greater than the maximum.

    Explanation:

    When evaluated, the length specification for the string host variable,
    whose entry in the SQLDA is indicated by <var-number> (based at 1), was
    negative or greater than the maximum defined for that host variable.

    The statement cannot be processed.

    User response:

    Correct the program to ensure that the lengths of all string host
    variables are not negative or that they are not greater than the maximum
    allowed length.

    sqlcode: -311

    sqlstate: 22501

    Comment

    Working...