createStatement() does not work on passing parameters

I use following code to create statement,

I am using Microsoft Access DataBase

1:st= dbConnection.createStatement();

2:st= dbConnection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );

-

rsAuthors = st.executeQuery

("SELECTlastname,firstname,city,country FROM authors ");

line 1: using ,complies and run reterning resultset forwardonly

line 2: using ,compiles but on run message displayed on command

prompt

"Optional features of Microsoft Access

drivers are not implemented "

why...............

[627 byte] By [shahidjava] at [2007-9-26 1:25:14]
# 1

Hi,

The Jdbc-Odbc bridge doesn't support yet the JDBC 2.0 API features (look at http://java.sun.com/products/jdbc/faq.html#2 ).

If you do need a scrollable/updateable resultset, you'll need a JDBC type 4 driver (look at http://industry.java.sun.com/products/jdbc/drivers )

Hope this helps,

Kurt.

leukbr at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Another remark: try to install the latest MDAC, available from http://www.microsoft.com/data/download_260rtm.htm .Only to be sure the odbc driver itself is up-to-date.
leukbr at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
Thanks but explain me"If you do need a scrollable/updateablerultset, you'll need a JDBC type 4 driver " I am very new to JDBC.
shahidjava at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

Actually, what I wanted to say is that you need a driver that is compliant with JDBC 2.0 API. This is because scrollable and updatable resultsets are introduced in this API.

About the driver "types": all jdbc drivers fall into certain categories (types). For a short description about each type, take a look at http://java.sun.com/products/jdbc/driverdesc.html

So, what you basically need to do is go to the link mentionned in my previous posting, select "JDBC API 2.0" and "MS Access" or "ODBC", and search for a compliant driver. The most of them offer a trial version.

leukbr at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

For someone, who's very new to Java, I would suggest:

1. Simply use a default Statement. You can do every SQl command with it.

For learning it's enough, what you have:

Access, ODBC, standard JDBC features.

If you go forward and come near big scale productive environment, then t's time for:

"real" DBMS e.g. SQLServer, Oracle, maybe Interbase 6 (=free), Type 4 driver, advanced JDBC features.

2. Don't forget leukbr's 10 Duke Dollars :-)

Hartmut at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
Hi, I think Windows 2000(which has got lastest MS-Access) supports JDBC ver 2.0 U can try that oneVinay
psvinayram at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7
>I think Windows 2000(which has got lastest MS-Access) supports JDBC ver 2.0 You are saying that Microsoft, who produces Win 2k and MS Access, is providing a JDBC 2.0 compliant driver with those products?What directory did you find the jar file for that?
jschell at 2007-6-29 1:06:29 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...