0
How can I make a database application
database with Java Programming
3 odpowiedzi
+ 1
Database and related stuff comes under JDBC
the basic steps are :
1. Register a Driver using ClassForName() method.
2. Create Connection object
3. Create Statement method of connection interface which is used to create statement(which is used to execute the query)
Statement stm=con.createStatement();
4. Create a variable to store the result of query using ResultSet
ex=>
ResultSet rs=statement.executeQuery(query)
5.Close the Connection obj.
con.close()
Follow these step you'll surely be able to develop any db application whether it be gui or command line interface .
0
There's JDBC Library to connect your java with SQL. There's also ODBC for Oracle Database and MDBC for Microsoft database.
But MDBC is no longer supported in JDK 8.
Here I will show you the tricks how to connect your java application with SQL database.