<%@ taglib prefix= "c " uri= "http://java.sun.com/jsp/jstl/core " %>
<%@ taglib prefix= "sql " uri= "http://java.sun.com/jsp/jstl/sql " %>
<%@ taglib prefix= "fmt " uri= "http://java.sun.com/jsp/jstl/fmt " %>
<%@ page import= "java.sql.* " %>
<sql:setDataSource driver= "com.microsoft.sqlserver.jdbc.SQLServerDriver "
url= "jdbc:sqlserver://192.168.1.2:1433;Database=** "
user= "** "password= "** "var= "DS "/>
<sql:update dataSource= "${DS} " var= "empDbInfo " >
insert into SysUser (UserName,UserPassword)
values(?,?)
<sql:param value= "${param.userName} "/>
<sql:param value= "${param.password} "/>
</sql:update>
------解决方案--------------------
报什么错?
------解决方案--------------------
检查一下,有没有少包
------解决方案--------------------
sqlserver打了sp3补丁了吗,如果打了的话,看看环境变量中有没有设置jar路径,
建议使用jtds的连接包,我习惯使用这个,如果还有问题在发回帖我再看看
------解决方案--------------------
<sql:setDataSource driver= "com.microsoft.sqlserver.jdbc.SQLServerDriver "
url= "jdbc:sqlserver://192.168.1.2:1433;Database=** "
user= "** "password= "** "var= "DS "/>
换成
<sql:setDataSource driver= "com.microsoft.sqlserver.jdbc.SQLServerDriver "
url= "jdbc:sqlserver://192.168.1.2:1433;DatabaseName=** "
user= "** "password= "** "var= "DS "/>