If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > problem with field DATE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-04, 04:21
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
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
__________________
geoffrey
- Four J's Development Tools -

Last edited by geoffrey; 07-01-04 at 04:35.
Reply With Quote
  #2 (permalink)  
Old 07-01-04, 10:27
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 07-01-04, 11:27
geoffrey geoffrey is offline
Registered User
 
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 -
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On