Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Posts
    69

    Unanswered: Current Timestamp Issue

    Hi
    we are using os/390 db2 v6.1 database. Our Middle tier is the ATL/COM+ environment. We are seeing some errors like the bellow for the update method where we are using the "Current timestamp" method.

    """"

    [IBM][CLI Driver][DB2] SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007


    """".

    Please note that this is not happening regularly, but very rarely. May be a day / once in two days. My question is, there are hundreds/thousands of users accessing our webpage and going through the same flow and for them the value is getting updated properly, but why this is happening very rarely.

    Thanks,
    Anto.A.R.

  2. #2
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    I have a hazy memory of this kind of error being something to do with the user's operating system locale (e.g. US or UK date format).

    That's about all I can remember (sorry) but I hope it puts you on the right track or jogs someone elses memory.

  3. #3
    Join Date
    Mar 2003
    Posts
    69
    Ok,
    Do you have any idea why this is happening. Seems to be strange, but any idea the reason. Also when I say "Current timestamp" it should pickup the os/390 local time ( ie the db2 local time). So is there going to be a problem with that ??

  4. #4
    Join Date
    May 2003
    Posts
    113
    I am interested in this topic. How do you know that is the value of CURRENT TIMESTAMP(which is a special register of db2/390) went wrong.

    If I assume your stmt is something like:
    select * from table where current timestamp > a-host-variable;
    the host-variable may be wrong?


    Originally posted by antodomnic
    Ok,
    Do you have any idea why this is happening. Seems to be strange, but any idea the reason. Also when I say "Current timestamp" it should pickup the os/390 local time ( ie the db2 local time). So is there going to be a problem with that ??

  5. #5
    Join Date
    Mar 2003
    Posts
    69
    Noops, We have logs which captures all the errors with respect to db2. On that particular transaction, we are updating the table with one string value and the timestamp with current timestamp. From the log as I given already, it was shown "date time value incorrect". So Iam thinking it should be related to the timestamp as no other thing went to the database at that juncture. - Anto

  6. #6
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    Originally posted by antodomnic
    Ok,
    Do you have any idea why this is happening. Seems to be strange, but any idea the reason. Also when I say "Current timestamp" it should pickup the os/390 local time ( ie the db2 local time). So is there going to be a problem with that ??
    Like I say, it's a hazy memory. We had what I assume was a similar issue. Web based java apps sitting on a DB2 database were catching invalid date format exceptions on some machines but not others.

    We found that we could fix it in the short term by setting the Windows locale on the client machine to our default (control panel >>> regional options; on the 'general' tab, set default to whatever it should be.)

    I don't fully understand why this works to be honest! When is a date not a date?

    Beyond that I can't help you (I was out of the loop by the time the long term solution was implemented).

Posting Permissions

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