🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JDBC:ODBC - Feature not implemented?

#133
From: Alexey Kuznetsov
Date: Wed, 18 Jul 2001 06:09
33 lines
2210 bytes
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();
....

Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC SQL
Server Dr
iver]Optional feature not implemented
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
        at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
        at sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterDate(JdbcOdbc.java:752)
        at
sun.jdbc.odbc.JdbcOdbcPreparedStatement.setDate(JdbcOdbcPreparedState
ment.java:833)

Here is the table definition SQL statement:
create table log (
   execdate datetime not null,
   toolid int not null
)


Any help is very appreciated!

Thanx!

Alexey
Technical Details
Message-ID: <9j35gr$8rj$1@news.sovam.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.sovam.com!sovam!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 107d46,cc7d5a6bac724d41,start
X-Google-Attributes: gid107d46,public
X-Google-Thread: 10a146,cc7d5a6bac724d41,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: 113ae9,cc7d5a6bac724d41,start
X-Google-Attributes: gid113ae9,public
X-Google-Thread: fb99b,cc7d5a6bac724d41,start
X-Google-Attributes: gidfb99b,public
X-Google-ArrivalTime: 2001-07-17 22:50:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.sovam.com!sovam!not-for-mail
From: "Alexey Kuznetsov" <getweb@pochta.org>
Newsgroups: comp.lang.java.help,comp.lang.java.databases,comp.lang.java.programmer,cz.comp.lang.java
Subject: JDBC:ODBC - Feature not implemented?
Date: Wed, 18 Jul 2001 13:09:55 +0700
Organization: Golden Telecom
Lines: 38
Message-ID: <9j35gr$8rj$1@news.sovam.com>
NNTP-Posting-Host: 195.239.175.170
X-Trace: news.sovam.com 995432796 9075 195.239.175.170 (18 Jul 2001 05:06:36 GMT)
X-Complaints-To: abuse@online.ru
NNTP-Posting-Date: Wed, 18 Jul 2001 05:06:36 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600