In VB.NET ...If you want to display the content of your database in a datagridview component what you just need to do is to call odbc.odbcDataAdapter so that it will display all the data in datagrid as exactly as your database..
My question is, Does java has equivalent class for odbc.odbcDataAdapter like in VB.NET,
If yes , then may I know what class I need and if none, give me a piece of suggestions so that i can display in the content of my database in datagridview(If I am not mistaken JTable is the equivalent in java)
I am currently working in databases specifically odbc.
//well im still a java beginners in java bro!just study out of this code maybe you will have the //idea on how to do...I've tried this code to get data in a cetain database..!
public class alpe_connect_database
public static void main(String args)
Connection conn = DriverManager.getConnection("jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=c:\\data.mdb;");
Statement command = conn.createStatement();
ResultSet rs = command.executeQuery("select * FROM namelist");
System.out.print("ID NUMBER : ");
System.out.println("NAME : "+rs.getString(3)+" , "+rs.getString(2));
System.out.println("Connected To Access");
catch (SQLException se)
catch (Exception ex)
//just try it bro!gdluck..