Skip to main content

JDBC-ODBC compatibility problem...

1 reply [Last post]
alek
Offline
Joined: 2003-09-30
Points: 0

hi! my problem is this, i'm using JDBCODBC driver to access MS Acces, its works in the program after the user login and acces the main program, but it shows some error in the command line, like this.

***START ERROR****

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at LoginFrm.jbInit(LoginFrm.java:171)
at LoginFrm.(LoginFrm.java:56)
at LoginFrm$2.display(LoginFrm.java:138)
at LoginFrm$2.actionPerformed(LoginFrm.java:118)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

***END OF ERROR***

my program still working even this error shows up in command line, is Java 1.4 compatible with JDBCODBC driver or JDBC 1.0 API version? i think i'm using JDBC 1.0, coz if i build my class it say that:
Note: C:\JavaCourseware\LoginFrm.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
Finished LoginFrm.
how can i solve this problem? thanks for all memebers and non members for reading my problem. i can post a code for the program. if anyone like to see it.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Krishna Prasad
Offline
Joined: 2006-02-17
Points: 0

Hi,

Check that, Database Connection Object is not closed before it is opened for 2nd time. So, This is the result of trying to open the Database Connection which is already opened.