NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NetBeans connect to MS Access

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
hazel4832



Joined: 04 Aug 2009
Posts: 1

PostPosted: Tue Aug 04, 2009 5:18 pm    Post subject: NetBeans connect to MS Access Reply with quote

I am new to NetBeans (not so much Java, though). I am trying to connect to a MS Access database. I followed the example given on the NetBeans Wikisite but am getting a runtime error. If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:/Documents and Settings/lrobinson/My Documents/MyCustomers.mdb";'
I get:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:166)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)
at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)
at MyPack.NewJFrame.access$000(NewJFrame.java:22)
at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers.mdb";'
or 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers";
I get
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
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:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.sun.rowset.internal.CachedRowSetReader.connect(CachedRowSetReader.java:323)
at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:140)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)
at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)
at MyPack.NewJFrame.access$000(NewJFrame.java:22)
at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I've set up an ODBC Connection to the MYCustomers database called MyCustomers.

Can anyone help me with this?
Thanks.
Back to top
Gregg Wonderly
Posted via mailing list.





PostPosted: Tue Aug 04, 2009 8:14 pm    Post subject: NetBeans connect to MS Access Reply with quote

The message "Optional feature not implemented" is what you need to focus on.
The use of a cached row set appears to be the issue. You will need to access
your database with more primitive/old features of JDBC it appears to me.

Gregg Wondely

hazel4832 wrote:
Quote:
I am new to NetBeans (not so much Java, though). I am trying to connect to a MS Access database. I followed the example given on the NetBeans Wikisite but am getting a runtime error. If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:/Documents and Settings/lrobinson/My Documents/MyCustomers.mdb";'

I get:

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented

at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:166)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)

at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)

at MyPack.NewJFrame.access$000(NewJFrame.java:22)

at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6263)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6028)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2475)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers.mdb";'

or 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers";

I get

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.

at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)

at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)

at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)

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:582)

at java.sql.DriverManager.getConnection(DriverManager.java:185)

at com.sun.rowset.internal.CachedRowSetReader.connect(CachedRowSetReader.java:323)

at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:140)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)

at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)

at MyPack.NewJFrame.access$000(NewJFrame.java:22)

at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6263)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6028)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2475)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



I've set up an ODBC Connection to the MYCustomers database called MyCustomers.



Can anyone help me with this?

Thanks.





Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Thu Aug 06, 2009 1:53 am    Post subject: NetBeans connect to MS Access Reply with quote

This seems to be the most current page on the issue: http://wiki.netbeans.org/AccessMssql


From: hazel4832 <address-removed>
To: address-removed
Sent: Tuesday, August 4, 2009 12:18:45 PM
Subject: [nbusers] NetBeans connect to MS Access

I am new to NetBeans (not so much Java, though). I am trying to connect to a MS Access database. I followed the example given on the NetBeans Wikisite but am getting a runtime error. If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:/Documents and Settings/lrobinson/My Documents/MyCustomers.mdb";'

I get:

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented

at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:166)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)

at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)

at MyPack.NewJFrame.access$000(NewJFrame.java:22)

at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6263)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6028)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2475)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



If I put 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers.mdb";'

or 'private String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=MyCustomers";

I get

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.

at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)

at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)

at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)

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:582)

at java.sql.DriverManager.getConnection(DriverManager.java:185)

at com.sun.rowset.internal.CachedRowSetReader.connect(CachedRowSetReader.java:323)

at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:140)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:786)

at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1418)

at MyPack.NewJFrame.FilteredRowSetPopolaActionPerformed(NewJFrame.java:223)

at MyPack.NewJFrame.access$000(NewJFrame.java:22)

at MyPack.NewJFrame$2.actionPerformed(NewJFrame.java:103)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6263)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6028)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2475)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



I've set up an ODBC Connection to the MYCustomers database called MyCustomers.



Can anyone help me with this?

Thanks.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo