Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    1

    Unanswered: Msgsql0303 F/qsqrun2

    Hello,

    Please let me know if anyone came across the above mentioned message on AS/400.

    We have upgrade our OS/400 from V5R1 to V5R2 and now getting this message while running the old program we use o run prior to the upgrade.

    Regards.,

  2. #2
    Join Date
    Jan 2005
    Location
    Miami
    Posts
    10
    According to the error(SQL0303), it looks like there is a mimatch in datatype between the program and the field in the DB. Maybe the new version of the OS has changed the way it handles or recognizes some datatypes, which causes the mismatch between the program and the field in the DB2 table? Don't know much about OS400, just an idea.



    SQL0303N A value cannot be assigned to a host variable in the
    SELECT, VALUES, or FETCH statement because the data
    types are not compatible.

    Explanation:

    An embedded SELECT or VALUES statement selects into a host
    variable, but the data type of the variable is not compatible
    with the data type of the corresponding SELECT-list or
    VALUES-list element. Both must be numeric, character, or
    graphic. For a user-defined data type, the host variable might
    be defined with an associated built-in data type that is not
    compatible with the result type of the FROM SQL transform
    function defined in the transform group for the statement. For
    example, if the data type of the column is date or time, the data
    type of the variable must be character with an appropriate
    minimum length.

    The statement cannot be processed.

    User Response:

    Verify that the table definitions are current and that the host
    variable has the correct data type. For a user-defined data type,
    verify that the associated built-in type of the host variable is
    compatible with the result type of the FROM SQL transform
    function defined in the transform group for the statement.

    sqlcode : -303

    sqlstate : 42806

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •