NetBeans Forums

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

Problem : ODBC access database (.accdb)

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



Joined: 07 Oct 2012
Posts: 2

PostPosted: Sun Oct 07, 2012 5:58 pm    Post subject: Problem : ODBC access database (.accdb) Reply with quote

Hi everyone, I'm having problems accessing to my MS Access database(.accdb) after running my code.
I also have looked for other possible solutions(going through SysWOW64\odbcad32) before posting here, though I may have not quite followed every step correctly along the way.
I am using Windows 7 64-bit

The error statement:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3072)
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:579)
at java.sql.DriverManager.getConnection(DriverManager.java:243)
at login.ConnectDatabase.<init>(ConnectDatabase.java:2Cool
at login.Login.jButton1ActionPerformed(Login.java:128)
at login.Login.access$000(Login.java:20)
at login.Login$1.actionPerformed(Login.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
java.lang.NullPointerException
at login.Login.jButton1ActionPerformed(Login.java:147)
at login.Login.access$000(Login.java:20)
at login.Login$1.actionPerformed(Login.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)



Thank you in advance
Back to top
bolsover



Joined: 24 Jun 2010
Posts: 190

PostPosted: Sun Oct 07, 2012 6:40 pm    Post subject: Reply with quote

I can't be sure but I think the problem is that you have x64 java and x32 access with x32 odbc driver. I understand that ms do have an x64 odbc driver available for download.
Back to top
Kevin James Baxter
Posted via mailing list.





PostPosted: Sun Oct 07, 2012 11:19 pm    Post subject: Problem : ODBC access database (.accdb) Reply with quote

There are several solutions. Check this site for possible answers: http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html


The stack trace indicates that you're using the default type-1 Jdbc Odbc driver. This driver works best when a
System Data Source Name (DSN) is created. Follow the instructions on the site.


Many years have passed since I used JDBC with MS Access, so I am unaware whether a type-3 or type-4 driver
Is available. I hope this helps.

"There are only 10 types of people in the world: Those who understand binary, and those who don't"

On Oct 7, 2012, at 1:58 PM, "Trixtreme" <address-removed ([email]address-removed[/email])> wrote:



Quote:
Hi everyone, I'm having problems accessing to my MS Access database(.accdb) after running my code.
I also have looked for other possible solutions(going through SysWOW64\odbcad32) before posting here, though I may have not quite followed every step correctly along the way.
I am using Windows 7 64-bit

The error statement:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3072)
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:579)
at java.sql.DriverManager.getConnection(DriverManager.java:243)
at login.ConnectDatabase.<init>(ConnectDatabase.java:2Cool
at login.Login.jButton1ActionPerformed(Login.java:128)
at login.Login.access$000(Login.java:20)
at login.Login$1.actionPerformed(Login.java:50)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)

Back to top
Trixtreme



Joined: 07 Oct 2012
Posts: 2

PostPosted: Mon Oct 08, 2012 2:30 am    Post subject: Reply with quote

bolsover wrote:
I can't be sure but I think the problem is that you have x64 java and x32 access with x32 odbc driver. I understand that ms do have an x64 odbc driver available for download.


I've already uninstalled my java x64 and changed to java 6 32 bit but still seems to have the same error, I'm quite certain now that everything is running at 32 bits


Kevin James Baxter wrote:
There are several solutions. Check this site for possible answers: http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html


The stack trace indicates that you're using the default type-1 Jdbc Odbc driver. This driver works best when a
System Data Source Name (DSN) is created. Follow the instructions on the site.


Many years have passed since I used JDBC with MS Access, so I am unaware whether a type-3 or type-4 driver
Is available. I hope this helps.



I did check the site out but apparently it is for the old MS Access files (.mdb) while my database is (.accdb) and I also did check out easysoft for the driver which supports (.accdb) but it is only available for the Linux/Unix platforms...is there any workaround for this?
Back to top
Kevin James Baxter
Posted via mailing list.





PostPosted: Mon Oct 08, 2012 12:50 pm    Post subject: Problem : ODBC access database (.accdb) Reply with quote

Thank you for the update. Just to clarify, you are using Micro$oft Access 2007 running on Windows correct?


If so then have a look at this site:


http://social.msdn.microsoft.com/Forums/en/visualjsharpgeneral/thread/21ebec84-8bfe-41a7-868f-369aef1cb148


The poster had a similar experience.



"There are only 10 types of people in the world: Those who understand binary, and those who don't"

On Oct 7, 2012, at 10:30 PM, "Trixtreme" <address-removed ([email]address-removed[/email])> wrote:


Quote:

bolsover wrote:
Quote:
I can't be sure but I think the problem is that you have x64 java and x32 access with x32 odbc driver. I understand that ms do have an x64 odbc driver available for download.


I've already uninstalled my java x64 and changed to java 6 32 bit but still seems to have the same error, I'm quite certain now that everything is running at 32 bits



Kevin James Baxter wrote:
Quote:
There are several solutions. Check this site for possible answers: http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html (http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html)


The stack trace indicates that you're using the default type-1 Jdbc Odbc driver. This driver works best when a
System Data Source Name (DSN) is created. Follow the instructions on the site.


Many years have passed since I used JDBC with MS Access, so I am unaware whether a type-3 or type-4 driver
Is available. I hope this helps.



I did check the site out but apparently it is for the old MS Access files (.mdb) while my database is (.accdb) and I also did check out easysoft for the driver which supports (.accdb) but it is only available for the Linux/Unix platforms...is there any workaround for this?





Back to top
Kevin James Baxter
Posted via mailing list.





PostPosted: Mon Oct 08, 2012 1:01 pm    Post subject: Problem : ODBC access database (.accdb) Reply with quote

My apology: I hit the send button too soon!

Did you create the System DSN to your .accdb file? DNS provides the required bridge between
ODBC and JDBC. And a System DNS has greater flexibility than a User DNS.

And are you able to post the JDBC URL, without the username/password, of course? I want to verify the URL format.


"There are only 10 types of people in the world: Those who understand binary, and those who don't"

On Oct 7, 2012, at 10:30 PM, "Trixtreme" <address-removed> wrote:

Quote:

bolsover wrote:
Quote:
I can't be sure but I think the problem is that you have x64 java and x32 access with x32 odbc driver. I understand that ms do have an x64 odbc driver available for download.


I've already uninstalled my java x64 and changed to java 6 32 bit but still seems to have the same error, I'm quite certain now that everything is running at 32 bits



Kevin James Baxter wrote:
Quote:
There are several solutions. Check this site for possible answers: http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html (http://www.easysoft.com/applications/microsoft-access/jdbc-odbc.html)


The stack trace indicates that you're using the default type-1 Jdbc Odbc driver. This driver works best when a
System Data Source Name (DSN) is created. Follow the instructions on the site.


Many years have passed since I used JDBC with MS Access, so I am unaware whether a type-3 or type-4 driver
Is available. I hope this helps.



I did check the site out but apparently it is for the old MS Access files (.mdb) while my database is (.accdb) and I also did check out easysoft for the driver which supports (.accdb) but it is only available for the Linux/Unix platforms...is there any workaround for this?



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