Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   java database on the same directory (http://www.go4expert.com/forums/java-database-directory-t23652/)

badkalel14 23Oct2010 19:35

java database on the same directory
 
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

virxen 26Oct2010 12:00

Re: java database on the same directory
 
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 27Oct2010 20:11

Re: java database on the same directory
 
ah! this really answers my question! thank you virxen! thank you man!


All times are GMT +5.5. The time now is 07:16.