How do Java store a few data to a database in a computer that is not connected to any server, MySQL database or network connection, and how is the code to connect with it?.
Printable View
How do Java store a few data to a database in a computer that is not connected to any server, MySQL database or network connection, and how is the code to connect with it?.
I think This is your answer
Code :try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:dsn1"); Statement stat = con.createStatement(); Resultset rs = stat.executeQuery("select * from table"); rs.close(); stat.close(); con.close(); } catch(Exception e) { }
to create dsn go to Control Panel->Administrator tools->ODBC->Second tab->Add->button and create dsn
here d[/quote]