Try

pstmt.setTimestamp(new java.sql.Timestamp(System.currentTimeMillis());

Alex Amies

----- Original Message -----
From: Jacqueline Ng <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 30, 1999 6:19 PM
Subject: off-topic: Problem with JDBC


> Hi
>
> I'm using Microsoft SQL Server 7. And when I tried to insert a new record
into
> my table that has a datetime field, I get the following SQLException.
>
> SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not
implemented
>
> I was using a PreparedStatement to do the insertion.
> (eg. pstmt.setDate(new java.sql.Date(System.currentTimeMillis()); )
>
> Can anyone please help me?
>
> Thanks!
>
>
___________________________________________________________________________
> 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
>

___________________________________________________________________________
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