{ String str = tf5.getInt("ID"); Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection con = DriverManager.getConnection("jdbc:sqlserver://NOMBUSO1806:1433;databaseName= Employee ATM", "NOMBUSO1806", "mysql1234"); // write your database username and password PreparedStatement st = con.prepareStatement("select * from Employees where ID=?"); // Search with ATM ID st.setString(1, str); ResultSet rs = st.executeQuery(); // Excuting Query if (rs.next()) { String s = rs.getString(1); String s1 = rs.getString(2); String s2 = rs.getString(3); // Sets Records in TextFields. tf1.setText(s); tf2.setText(s1); tf3.setText(s2); my getInt() is throwing an error that the method is not found. what should i do?
{
String str = tf5.getInt("ID");
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:sqlserver://NOMBUSO1806:1433;databaseName= Employee ATM", "NOMBUSO1806", "mysql1234"); // write your
PreparedStatement st = con.prepareStatement("select * from Employees where ID=?"); // Search with ATM ID
st.setString(1, str);
ResultSet rs = st.executeQuery(); // Excuting Query
if (rs.next()) {
String s = rs.getString(1);
String s1 = rs.getString(2);
String s2 = rs.getString(3);
// Sets Records in TextFields.
tf1.setText(s);
tf2.setText(s1);
tf3.setText(s2);
my getInt() is throwing an error that the method is not found. what should i do?
Step by step
Solved in 2 steps