none
No data source name found and no default driver specified? (odbcad32, Java related)?

    Question

  • Hi, I have bit of a dillemma. I'm trying to connect to a Microsoft Access Database ('97 format) table using java. I have setup a data source in the obdcad32 named 'testingThis' under User DSN, which I set up by hitting add, selecting 'Microsoft Access Driver (*.mdb)', entering 'testingThis' in the Data Source Name field, selecting the database (where the access database in 97 format was saved), and clicked 'OK'. Supposedly the JDBC-ODBC driver does load, but it doesn't see the Datasource. Here is a sample of my code: Class.forName("sun.jdbc.odbc.JdbcOdb… String sourceURL = new String("jdbc:odbc:testingThis"); Connection databaseConnection = DriverManager.getConnection(sourceURL); Even though the data source variable 'testingThis' links to the database, I keeping on getting this: 'java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified' Is there something wrong with my computer maybe? If I could have help, I would greatly appreciate it. Thank you in advance. 1 year ago Report Abuse Additional Details I also have import statements at the beginning of my file: import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.sql.ResultSet; import javax.swing.*; -------------- help me
    • Moved by Alex Feng (SQL) Monday, April 18, 2011 9:52 AM move to an appropriate forum (From:SQL Server Setup & Upgrade)
    Tuesday, April 12, 2011 10:22 PM

Answers

  • (not sure that was a good move by ChunSong)

    Is this a web app? They typically run in the security context of the IIS user, not the logged-in user. That could explain why the DSN is not seen. Use a System DSN.


    -Tom. Microsoft Access MVP
    • Marked as answer by Bruce Song Thursday, April 21, 2011 2:52 AM
    Monday, April 18, 2011 1:38 PM

All replies

  • Hi,

    Since this question related with Jave/Access development, I would like to move to Access for Developers Forum where there are more experts about Access technologies.

    Thanks for your support and undersanding.


    Best Regards,
    Chunsong Feng

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, April 18, 2011 9:51 AM
  • (not sure that was a good move by ChunSong)

    Is this a web app? They typically run in the security context of the IIS user, not the logged-in user. That could explain why the DSN is not seen. Use a System DSN.


    -Tom. Microsoft Access MVP
    • Marked as answer by Bruce Song Thursday, April 21, 2011 2:52 AM
    Monday, April 18, 2011 1:38 PM
  • (not sure that was a good move by ChunSong)

    Is this a web app? They typically run in the security context of the IIS user, not the logged-in user. That could explain why the DSN is not seen. Use a System DSN.


    -Tom. Microsoft Access MVP

    How do I "use a system DSN"?

    Thank you.

    Thursday, May 10, 2012 12:46 AM
  • Hi,

    Since this question related with Jave/Access development, I would like to move to Access for Developers Forum where there are more experts about Access technologies.

    Thanks for your support and undersanding.


    Best Regards,
    Chunsong Feng

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    How do I find the continuation in the Access for Developers Forum?
    Thursday, May 10, 2012 12:46 AM