java database on the same directory

Newbie Member
23Oct2010,19:35   #1
badkalel14's Avatar
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
Pro contributor
26Oct2010,12:00   #2
virxen's Avatar
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 likes this
Newbie Member
27Oct2010,20:11   #3
badkalel14's Avatar
ah! this really answers my question! thank you virxen! thank you man!