- 1
how should i connect database to java
3 Antworten
0
It depends hardly on the used database technology. But in general use JDBC for this
0
Connection conn = DriverManager.getConnection("jdbc:mysql://serverName/dbName", "userName", "password");
0
Use jdbc package. Create object of drivermanager class and then connection object. It's a long process but check it out here:
https://www.tutorialspoint.com/jdbc/jdbc-sample-code.htm