Originally posted by aminur rashid:
I have a .mdb(acces file ).I want to open this mdb file by java programme .This means that whenever i run my java code with the path of mdb specified in the code, the mdb file should open up .Can any one help me out how to do this?
Thanks
Amin
You have to follow these steps.
1. Create a system data source name using the odbc administrator of the windows machine you are using.
2. Load the sun.jdbc.odbc.JdbcOdbcDriver class(Since we are using JDBC type 1 connection)
3. Get a conection to the database
4. Create a statement object
5. Fire an SQL to obtain a resultset
6. Browse thru the resultset to obtain data and do your processing
7. Close the connection
------------------
Shubhrajit