I'm trying to insert Data into an access table. Moreover, I'm able to retrieve data on the table (to prove that I'm connecting fine)... I just can't insert Data
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(url);
System.out.println("Connection Successful");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("INSERT INTO Worker VALUES ('" + strDataName + "', '" + strDataDept + "', '" + dblDataHoursWrked + "', '" + dblDataHourlyWage + "', '" + dblDataPay + "')");
rs.close();
processQuery(con, st); // does what is nessesary to complete the current request
st.close();
con.close();
}
catch (ClassNotFoundException e)
{
System.out.println("failed to load OBCD driver. ");
System.out.println ("Class errros: " + e);
}
For some reason, I don't have any errors Its just not inserting the data to the table.. any help would be greatly appreciated