Hans Liebenberg wrote:
>
> I have run into a problem that doesn;t make much sense, I think I'm
> obvioulsy being a bit stupid.
> I am accessing a SQL server 7.0 database storing and retrieving datetime
> field types.
>
> I want to insert the current date AND time into the field.
>

It's not a direct answer to your question, but...

If you want to set the value of the column to the current date and time when
the row is inserted, just define the column to have a Default Value of
"getDate()". Then, don't set the value at all in your INSERT statement. When
the row is inserted, SQL Server will automatically  set the column value to
the current date and time.

Vince Bonfanti
New Atlanta Communications, LLC

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to