ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TIMESTAMP Format on SQL/Server DB

Post new topic  Reply to topic
 TIMESTAMP Format on SQL/Server DB « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Mon Dec 19, 2005 12:47 pm    Post subject: TIMESTAMP Format on SQL/Server DB Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I had a nice working message flow that logged timestamps to a DB2 Database. Now the customer decided they don't want to use DB2 any more but SQL/Server.

I moved the audit table from DB2 to SQL/Server. I kept the Primary Key to the table (the timestamp field) as a TIMESTAMP data type.

When I run the message flow, I get errors that relate to the TIMESTAMP field.
The SQLSTATE is 07006
The SQL Error Text is "ODBC SQL Server Driver] Restricted Data Type attribute violation.

I would like to know how I can insert a valid timestamp from the MEssage flow into the SQLServer Timestamp datatype.

I have tried a number of things. I even suggested to the customer that the datatype was changed to DATETIME (which is easy to code in ESQL) but they won't budge.
Any suggestions most welcome.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Ian
PostPosted: Wed Dec 28, 2005 3:11 am    Post subject: Reply with quote

Disciple

Joined: 22 Nov 2002
Posts: 152
Location: London, UK

Quote:
I would like to know how I can insert a valid timestamp from the MEssage flow into the SQLServer Timestamp datatype.


It is my understanding that SQLServer does not have a TIMESTAMP datatype.

SQLServer has DATETIME and SMALLDATETIME datatypes.

Refer to the WBIMB v5 help topic "ak05730_" for further information on mapping WBIMB v5 ESQL datatypes and database dataypes.
_________________
Regards, Ian
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Dec 29, 2005 5:30 am    Post subject: Thanks Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Ian,
Thanks for the pointer. We have changed the way in which the DB access to SQL server is being done to remove any conflict in this area.
The TIMESTAMP variable type does map directly to the SQL/Server DATETIME type if we do the insert directly rather than via passthru.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TIMESTAMP Format on SQL/Server DB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.