s**u 发帖数: 17 | 1 I am trying to connect to access database through JDBC:ODBC in a java
programm
I tried to connect to the following url:
JDBC:ODBC:MyServer;database=mydb.mdb
and establish the access file with corresponding server and filename.
but when I run the program, it keep on telling me the following:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not
fou
nd and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3661)
at sun.jd |
m******t 发帖数: 2416 | 2 Did you create a data source with that specific name in your ODBC
settings?
【在 s**u 的大作中提到】 : I am trying to connect to access database through JDBC:ODBC in a java : programm : I tried to connect to the following url: : JDBC:ODBC:MyServer;database=mydb.mdb : and establish the access file with corresponding server and filename. : but when I run the program, it keep on telling me the following: : java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not : fou : nd and no default driver specified : at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3661)
|
s**u 发帖数: 17 | 3
I set up the data source with "ODBC datasource administrator". I added a MS
Access driver, setting as following:
DRIVER={Microsoft Access Driver (*.mdb)}
Server=MyServer
database=mydb
then I selected the file mymd.mdb to link to the datasource
source file named mydb.dsn was constructed by computer.
there must be something wrong, but i just don't know it
【在 m******t 的大作中提到】 : Did you create a data source with that specific name in your ODBC : settings?
|
m******t 发帖数: 2416 | 4 What is the name you gave to the data source? It has to be
the one you passed to the JDBC:ODBC bridge in your program.
【在 s**u 的大作中提到】 : : I set up the data source with "ODBC datasource administrator". I added a MS : Access driver, setting as following: : DRIVER={Microsoft Access Driver (*.mdb)} : Server=MyServer : database=mydb : then I selected the file mymd.mdb to link to the datasource : source file named mydb.dsn was constructed by computer. : there must be something wrong, but i just don't know it
|