请老师们帮我看看哪里出问题,在数据库添加数据,请问语句是否有问题,我按书本上的和网上的都不怎么行
import java.sql.*;public class Conn {
static Connection con;
//static PreparedStatement sql;
static ResultSet res;
public Connection getConnetion(){
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
System.out.print("驱动加载成功");
} catch (Exception e1) {
e1.printStackTrace();
}
try {
con=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=ADM","sa","sa");
System.out.print("数据库连接成功");
} catch (Exception e1) {
e1.printStackTrace();
}
return con;
}
public static void main(String[] args) {
Conn c=new Conn();
c.getConnetion();
try {
String sql="insert into user(userID,password)values(51,65)";
Statement stmt=con.createStatement();
stmt.executeUpdate(sql); //报错指示在这行报错内容是:Incorrect syntax near the keyword 'user'
System.out.print("添加成功");
con.close();
}catch (Exception e1) {
e1.printStackTrace();
}
}
}