<% //加载驱动程序 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //建立连接 Connection conn=DriverM
rs=stmt.executeQuery("SELECT*FROMbooktablewherebookid='ISBN7-04-012301-0'");出现错误:Stri...
rs=stmt.executeQuery("SELECT * FROM booktable
where bookid='ISBN 7-04-012301-0'"); 出现错误:String literal is not properly closed by a double-quote,这是怎么回事啊???
<% //加载驱动程序
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//建立连接
Connection
conn=DriverManager.getConnection("jdbc:odbc:bookshop","","");
//发送SQL语句
Statement stmt=conn.createStatement();
try{ //建立ResultSet(结果集)对象
ResultSet rs;
//执行SQL语句
rs=stmt.executeQuery("SELECT * FROM booktable
where bookid='ISBN 7-04-012301-0'");
%> 展开
where bookid='ISBN 7-04-012301-0'"); 出现错误:String literal is not properly closed by a double-quote,这是怎么回事啊???
<% //加载驱动程序
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//建立连接
Connection
conn=DriverManager.getConnection("jdbc:odbc:bookshop","","");
//发送SQL语句
Statement stmt=conn.createStatement();
try{ //建立ResultSet(结果集)对象
ResultSet rs;
//执行SQL语句
rs=stmt.executeQuery("SELECT * FROM booktable
where bookid='ISBN 7-04-012301-0'");
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询