Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    39

    Unanswered: problem with field DATE

    Hello,

    I'm wondering if a global environment variable defining the format of a date exists for DB2 (as DBDATE for Informix or NLS_DATE_FORMAT for Oracle).

    I get this error when trying to insert a date in a field date passing throught a 4gl program :
    SQL statement error number -6372 (-301).
    [IBM][CLI Driver][DB2/SUN] SQL0301N The value of input host variable or parameter number "" cannot be used because of its data type. SQLSTATE=07006

    Thx
    Last edited by geoffrey; 07-01-04 at 05:35.
    geoffrey
    - Four J's Development Tools -

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    What date format do you want to use, and exactly what value is the 4GL program using when you get the error?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jun 2004
    Posts
    39
    I was inserting a DATE value in a VARCHAR DB2 field, and then retrieve this value with an INSERT INTO statement inserting the value in a variable of type DATE.

    I've find out a solution, positionning DBDATE (to Y4MD/ in my case).
    geoffrey
    - Four J's Development Tools -

Posting Permissions

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