🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.help
Article #138

Re: JDBC:ODBC - Feature not implemented?

#138
From: Lee Fesperman
Date: Thu, 19 Jul 2001 06:26
20 lines
1927 bytes
Alexey Kuznetsov wrote:
> 
> Hello, All !
> 
> Suggest please why the following code throws an exception:
>  ...
>   Connection con = DriverManager.getConnection("jdbc:odbc:DB;uid=sa;");
>   PreparedStatement ps = con.prepareStatement("INSERT INTO log VALUES (?,
> 1)");
>   ps.setDate(1, new java.sql.Date(System.currentTimeMillis()));
>   ps.executeUpdate();
> ....

Try ps.setTimestamp(1, new java.sql.Timestamp(...

-- 
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
===================================================================
* Check out Database Debunkings (http://www.firstsql.com/dbdebunk/)
* "The Forum Where Database Matters Are Set Straight"
Technical Details
Message-ID: <3B567D95.6F72@ix.netcom.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail
References: <9j35gr$8rj$1@news.sovam.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb99b,cc7d5a6bac724d41
X-Google-Attributes: gidfb99b,public
X-Google-Thread: 107d46,cc7d5a6bac724d41
X-Google-Attributes: gid107d46,public
X-Google-Thread: 113ae9,cc7d5a6bac724d41
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10a146,cc7d5a6bac724d41
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2001-07-18 23:29:39 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail
From: Lee Fesperman <firstsql@ix.netcom.com>
Newsgroups: comp.lang.java.help,comp.lang.java.databases,comp.lang.java.programmer,cz.comp.lang.java
Subject: Re: JDBC:ODBC - Feature not implemented?
Date: Wed, 18 Jul 2001 23:26:29 -0700
Organization: FFE Software, Inc.
Lines: 20
Message-ID: <3B567D95.6F72@ix.netcom.com>
References: <9j35gr$8rj$1@news.sovam.com>
NNTP-Posting-Host: a5.f7.c9.81
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Server-Date: 19 Jul 2001 06:29:02 GMT
X-Mailer: Mozilla 2.01 (Win95; U)