I’ve never done anything with JDBC or much with Oracle, but I’ve connected to my jdbc this way:
String driverName = "oracle.jdbc.driver.OracleDriver";
Class.forName(driverName);
// Create a connection to the database
String serverName = "xxx.xx.xx;
String portNumber = "1521";
String sid = "mysid";
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber
+ ":" + sid;
String username = "PGSWLOG";
String password = "PGDEV";
connection = DriverManager.getConnection(url, username, password);
Now what classes do i need to use to insert tables into the database? Any help would be appreciates. TIA
When you wrote
insert tables into the database, did you mean1) Create a new table in DB, or
2) Add new row(s) into an existing DB table?
In either case, read the tutorials posted by @Marcelo Hernández Ris and then follow with the good examples for JDBC and Sql92 syntax on http://www.java2s.com/.