本帖最后由 许瑞航 于 2012-7-14 12:26 编辑
package test.login;
import java.sql.*;
public class delete {
String userid = null;
Data newdate = new Data();
public void delete(String userid) throws SQLException{
try
{
Connection conn = Data.getConnection();
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("delete from userdate where userid =?");
conn.close();
catch (Exception e)
{
System.out.println("error");
}
}
}
}
中的conn.close();“;”提示出错Syntax error, insert "}" to complete Block。还有倒数第3个}也出错:Syntax error on token "}", delete this token
|
|