hello
i have access database
i want the method to create server ?
and how put this database in the server ?
and how create connection with java app and this data base
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
hello
i have access database
i want the method to create server ?
and how put this database in the server ?
and how create connection with java app and this data base
If this is a java application, creating server is not required, what you need to do is to connect ODBC with JDBC to visit MDB file. Code is attached for you.
String dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
String dbUrl = "jdbcdbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/database/t.mdb";
String dbUser = "sa";
String dbPassword = "sa";
Connection connection = null;
try{
Class.forName(dbDriver);
connection = DriverManager.getConnection(dbUrl,dbUser,dbPasswor d);
} catch (Exception e){
System.out.println("haha");
e.printStackTrace();
}
...
Hello.
Please before posting questions try to ensure the question is correct.
We never create database servers from java.
If there is a database server running then we can invoke db operations on the data residing in the db server using Java. For that we will use JDBC.
Thanks,
Syed.