This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I m facing problem when i insert data into the MS Access through JDBC. I m using jdk1.4 Beta and have got the results using next method. Even though i m passing the parameters ResultSet.TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE in createStatement method. Can anyone tell me about what i m missing. Thanks in Advance
If you are connecting to an Access database you are probably using the JDBC-ODBC bridge (type 1 driver) so all those settings are ignored. Or rather, they are not supported by that driver. There is a problem where inserts and updates don't go through until the next operation is performed on the connection. Try one of these: * if you need to, insert another row. * or you can perform a dummy select like select id from table * I usually set autoCommit(true) and have no problems. I don't usually recommend doing this, but if it's Access, who cares! Dave
There is a problem with the updates of existing records that can be solved using a dummy query (query something small and don't to do anything with the results). But from my experience and a couple other posts I've found (with massive searching) there is also a bug in the odbc driver for Access that comes with Windows 2000 service pack 2 (not sure if it's in the earlier sp's or not). I solved my problem by installing sp3. I believe you can also download the mdac package from microsoft at http://www.microsoft.com/data/download.htm and get the driver from it. I don't know if this will interfere with anything else though.