Categories

Main
Database
Java
Microsoft.NET
Adabas
DB2
Informix
Microsoft SQL Server
MySQL
Oracle
Pervasive.SQL
PostgreSQL
Sybase
Other
ASP
ColdFusion
Crystal Reports
Delphi, C etc
JAVA
Microsoft.NET
Perl and the DBI
PHP
ANSI SQL
Unix Shell Scripts
Visual Basic
XML & XSLT
Corel Paradox
FileMaker
Microsoft Access
Microsoft Excel
Other PC Databases
Applications & Tools
Database Concepts & Design
EJB programming & troubleshooting
EJB design
General J2EE
XML & Web services
Web tier: servlets, JSP, Web frameworks
Performance and scalability
Industry news
TSS feedback
Mobicents Contributors
Mobicents Users
JSLEE Resource Adaptor Types
Planning JavaOne 2008
Sun Tech Days
Other Java conferences
Binary Web Services and XML
Metro and JAXB
GlassFish
GlassFish Plugins
Project jMaki
GlassFish WebTier
Mural
Java Development Tools
Java WS & XML Community News
JAXP
Java SE
6uN Early Access
Java Quick Starter
Java SE Snapshots: Project Feedback
JCK Forum
Feedback and Suggestions
JDK Distros
JDK Open Source
General JSR Discussion
JCP 2.6
JXTA Community Forum
ME Interest
ME Cool Apps
ME General Help
ME Feedback & Suggestions
ME Application Developer Interest
Blu-ray Disc Java
ME Developer Days
Squawk
Mobile Developer Alliance
OpenCable
LWUIT
JavaFX Script Language Discussion
OpenJFX General Discussion
Scene Graph
General Performance Discussion
Your Java Career
NetBeans 6.0
Servlets
JSP
JSF
Portals and Portlets
EJB and Other Java EE Technologies
Distributed Java
Object Relational Mapping
JDBC
Web Services
Swing / AWT / SWT / JFace
JNLP and Web Start
Java Micro Edition
Sockets and Internet Protocols
Threads and Synchronization
Performance
Applets
I/O and Streams
Other Java APIs
Game Development
Java in General (beginner)
Java in General (intermediate)
Java in General (advanced)
Programmer Certification (SCJP)
Developer Certification (SCJD)
Associate Certification (SCJA)
Web Component Certification (SCWCD)
EJB Certification (SCBCD)
Mobile Application Certification (SCMAD)
Architect Certification (SCEA)
Web Services Certification (SCDJWS)
XML Certification
Product and Other Certifications
Mock Exam Errata
Sun Certification Results
Authors' Corral
Book Reviews
Events
Bunkhouse Porch
Teachers' Lounge
Testing
OO, Patterns, UML and Refactoring
IDEs, Version Control and other tools
Ant, Maven and Other Build Tools
Linux / UNIX
Mac OS
HTML and JavaScript
XML and Related Technologies
Agile and Other Processes
General Computing
Security
Groovy
Scala
Other Languages
Struts
Application Frameworks
Other Open Source Projects
BEA/Weblogic
IBM/Websphere
Oracle/OAS
Apache/Tomcat
JBoss
Other Java Products and Servers
JavaRanch
Cattle Drive (java college)
Moderators Only
Trash Can
Jobs Offered
Jobs Wanted
Jobs Discussion
Meaningless Drivel
Programming Diversions
Blatant Advertising
Java Announcements
New To Java
Advanced Java
Java Applets
Networking
Threads and Synchronization
Java 2D
AWT / Swing
SWT / JFace
CLDC and MIDP
CDC and Personal Profile
Sun Java Wireless Toolkit
Enterprise JavaBeans
JavaServer Pages (JSP) and JSTL
Java Servlet
JavaServer Faces
Web Frameworks
Database
XML
Lucene
NetBeans
Eclipse
IntelliJ IDEA
JCreator
Other IDEs
Java Tutorials
Java Tips
Jobs Discussion
Jobs Offered
Jobs Wanted
Professional Certification
Forum Lobby
Java Blogs
Introductions
Reviews / Advertising
Suggestions & Feedback

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

DB2

DB2 is IBM's offering to the highend database market. The latest version of DB2 (Universal Database) is ideal for OLTP, Data Warehousing, Decision Support and everything in between. It's well priced, extremely scalable and runs on virtually every platform out there from handhelds to mainframes.

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.

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.

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 ??

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? 



	Quote:
	
	
		
			
				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 ??

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

Quote:
	
	
		
			
				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).


Related Links

counting rows
Problem with roll-forwarding in DB2 7.1 AIX
Shell script
How to increase Buffer Pool size in DB2 to store Clob value
DB2 goes down each time a particular query is run
DB2 Administration Client V8.1 error
Fixpack 11 on DB2 6.1 - incorrect modification number?
DB2 non-partition Node Crash
JOB POST: EEE DBA - Toronto, Canada
How to Connect 2 databases in DB2Udb in windows
DB2 6.1 Migration to DB2 7.1
How to use db2 restore to restore a new database
ICE no more available ...why ?
DB2 Protocol description
SQL script for DB2
My First DB2 Installation