
hello,
In all your tutorials, you have used Mysql. If instead of mysql i use microsoft access so how will it differ and wat will be the connection steps?

Follow these steps:
1)Go to the start<<Control Panel<<Administrative Tools<< data sources.
2)Click Add button and select the driver Microsoft Access Driver(*.mdb).
3)After selecting the driver, click finish button.
4)Then give Data Source Name and click ok button.
5)Your DSN will get created.
6) Restart your command prompt and compile your program:
import java.sql.*;
import javax.swing.*;
class Retrieve{
public static void main(String[] args){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:student");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from data");
String name="",address="";
while(rs.next()){
System.out.println(rs.getString("name")+rs.getString("address"));
}
}
catch(Exception e){}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.