java database on the same directory

badkalel14's Avatar, Join Date: Jul 2010
Newbie Member
hello guys do you have any idea how to do a program where the database is inside the main project meaning the jar file doesnt rely on a computers database
0
virxen's Avatar, Join Date: Nov 2009
Pro contributor
you mean something like this?

Code:
.........
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String myDB = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/data/month.MDB";
DBConn = DriverManager.getConnection(myDB,"","");
......
badkalel14 like this
0
badkalel14's Avatar, Join Date: Jul 2010
Newbie Member
ah! this really answers my question! thank you virxen! thank you man!