Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Sean Anderson   on Dec 28 In Java Category.

  
Question Answered By: Estella Mitchell   on Dec 28

if u r using window xp/2000
then do in that manner

1. go in control panel
2. open addministrative tool
3.there u find odbc  click it
4. a form with title ODBC Data Source Administrator
5. select system dsn tab
6. press add button.
7. there u find microsoft access  driver(*.mdb) select
it
8.now u ll find one more form with microsoft access
setup. click on select button by which u can select u
database. and give the database name as u use in ur
coding of java.
9. if dsn is not created with any error login with
administrator login and try again.

in java form use following codes
Class.forName(sun.jdbc.odbc.JdbcodbcDriver);
Connection
conn=DriverManager.getConnection("jdbc:odbc:DSNname,"","");

at DSNname use ur dsn name.

Share: