Hello everyone,
I am very new to Java, so excuse my ignorance.
I want to retrieve data from my form, located in AvailAccount - it's a select box, and load it to a Java servlet. Once in my servelet, how would I go about updating the database? I have the connection established. But don't know what is needed next to complete this.
Any help would be most appreciated.
Below is code I currently have.
import java.sql.*;
import java.util.*;
public class AccountUpdate implements java.io.Serializable {
private Vector accountUpdates = null;
private java.sql.Connection conn = null;
private static final String DBURL = "jdbcracle:thintsc:1521:tmsdb01p";
private static final String DBLogin = "tscadmin";
private static final String DBPassword = "e1cadm1n";
private static final String driverName = "oracle.jdbc.driver.OracleDriver";
try {
Class.forName(driverName);
conn = DriverManager.getConnection(DBURL, DBLogin, DBPassword);
PreparedStatement prepStmt = null;
prepStmt = conn.prepareStatement = "INSERT INTO entitlement()..."
ResultSet resultSet = prepStmt.executeQuery();
}
}
I am very new to Java, so excuse my ignorance.
I want to retrieve data from my form, located in AvailAccount - it's a select box, and load it to a Java servlet. Once in my servelet, how would I go about updating the database? I have the connection established. But don't know what is needed next to complete this.
Any help would be most appreciated.
Below is code I currently have.
import java.sql.*;
import java.util.*;
public class AccountUpdate implements java.io.Serializable {
private Vector accountUpdates = null;
private java.sql.Connection conn = null;
private static final String DBURL = "jdbcracle:thintsc:1521:tmsdb01p";
private static final String DBLogin = "tscadmin";
private static final String DBPassword = "e1cadm1n";
private static final String driverName = "oracle.jdbc.driver.OracleDriver";
try {
Class.forName(driverName);
conn = DriverManager.getConnection(DBURL, DBLogin, DBPassword);
PreparedStatement prepStmt = null;
prepStmt = conn.prepareStatement = "INSERT INTO entitlement()..."
ResultSet resultSet = prepStmt.executeQuery();
}
}