利用java添加信息到数据库时报错 The method executeUpdate(String) is undefined for the type Statement
conn=DriverManager.getConnection("jdbc:odbc:test");stmt=conn.createStatement();stmt.e...
conn=DriverManager.getConnection("jdbc:odbc:test");
stmt= conn.createStatement();
stmt.executeUpdate("insert into dog (id,name,health,love,strain) values("+id+","+name+","+health+","+love+","+strain+")");
ResultSet rs=exexuteQuery("select * from dog"); 展开
stmt= conn.createStatement();
stmt.executeUpdate("insert into dog (id,name,health,love,strain) values("+id+","+name+","+health+","+love+","+strain+")");
ResultSet rs=exexuteQuery("select * from dog"); 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |