| Author |
How to insert a data of datetype timestamp into Sqlserver2000
|
Welsh Ding
Greenhorn
Joined: Dec 29, 2003
Posts: 14
|
|
In sqlserver2000,a table have a column is datatype timestamp,I used these mothed to insert a record: 1.insert tableName values (CURRENT_TIMESTAMP); error: Disallowed implicit conversion from data type datetime to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query. 2.insert tableName values ('1998-12-31 12:30:00'); error: Disallowed implicit conversion from data type varchar to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query. 3.insert tableName values (GETDATE()); error: Disallowed implicit conversion from data type datetime to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query. How to insert a data of datetype timestamp into Sqlserver2000? thanks in advance!
|
Welsh<br />SCJP 1.4
|
 |
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
|
|
hi: I am not sure of the answer, but you might want to try this: use java.sql.Date instead if java.util.Date
|
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
|
 |
 |
|
|
subject: How to insert a data of datetype timestamp into Sqlserver2000
|
|
|