请问一个关于事务方面的问题,在线等候,奖励高分 你是说数据库么?好像昨天刚刚有人问过。搜索一下。使用SQLException 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是的呀,我用事务写了一段代码,帮我修改一下吧这里的错误太多了<%@ page contentType="text/html;charset=gb2312"%> <%@ page import="java.sql.*"%> <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>db</title></head><html> <body><%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); String url="jdbc:microsoft:sqlserver://192.168.10.3:1433;DatabaseName=QQ"; String user="sa"; String password="123"; Connection con= DriverManager.getConnection(url,user,password); con.setAutoCommit(false); PreparedStatement updateSales=con.prepareStatement("UPDATE notice SET n_content=? WHERE n_subject=?"); updateSales.setString(1,"今天的天气特别好"); updateSales.setString(2,"通知"); updateSales.executeUpdate(); PreparedStatement updateTotal=con.prepareStatement("UPDATE notice SET n_createdate =n_createdate- ? WHERE n_content= ?"); updateTotal.setString(1,"20"); updateTotal.setString(2,"发资金"); updateTotal.executeUpdate(); con.commit(); con.setAutoCommit(true); con.close(); %></p></body> </html> 弹出对话框跳转问题 Tomcat6.0指定的服务并未以已安装的服务存在 如何用bean和servlet进行登录验证(不要用struts) 简单的权限控制 hibernate中属性能映射成nvarchar类型吗 JAVA当中如何获得一个汉字的拼音 vbscript能不能用在JSP中? 高分求高手:jsp中如何获得服务器的网卡地址? 急!急!急!关于发布后字体的问题...... 各位大侠 我现在做的项目里要用到Tree 但具体做法没有。请给点建议 jsp向sqlserver中插入中文记录需要转码吗?应该怎么写?! 如何对tomcat或resin做流量限制,使之不至于在大流量下down掉
这里的错误太多了<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>db</title>
</head><html>
<body>
<%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://192.168.10.3:1433;DatabaseName=QQ";
String user="sa";
String password="123";
Connection con= DriverManager.getConnection(url,user,password);
con.setAutoCommit(false);
PreparedStatement updateSales=con.prepareStatement("UPDATE notice SET n_content=? WHERE n_subject=?");
updateSales.setString(1,"今天的天气特别好");
updateSales.setString(2,"通知");
updateSales.executeUpdate();
PreparedStatement updateTotal=con.prepareStatement("UPDATE notice SET n_createdate =n_createdate- ? WHERE n_content= ?");
updateTotal.setString(1,"20");
updateTotal.setString(2,"发资金");
updateTotal.executeUpdate();
con.commit();
con.setAutoCommit(true);
con.close();
%>
</p>
</body>
</html>