还是数据连接的问题!!!!!!!!!!郁闷ing!!!!!!!!!!!!!!!!!!
我的系统是server,数据库是Sql Server2000,连接本地数据库出现错误,新建个工程把代码考过去就可以,这是为什么??(没有舍数据源)
<%@ Language = "VBScript" %>
<%
Dim strName,strCompany,strlink,strTitle,strQuestion
strTitle = Request.Form("textfield4")
strTitle = Trim(strTitle)
strTitle = replace(strTitle,"'","''")
strTitle = server.HTMLEncode(strTitle)
strQuestion = Request.Form("textfield4")
strQuestion = replace(strQuestion,"'","''")
strQuestion = replace(strQuestion,"<","<")
strQuestion = replace(strQuestion,">",">")
strName = Request.Form("textfield")
strCompany = Request.Form("textfield2")
strlink = Request.Form("textfield3")
set conn=server.createobject("adodb.connection")
Connstr="Provider=SQLOLEDB;Data Source=hf;UID=sa;PWD=sa;DataBase=BCAWeb"
conn.open connstr
set rec=server.createobject("adodb.recordset")
rec.open "select * from BCAWeb_Question where id is null",connstr,1,3
rec.AddNew
rec("name") = strname
rec("Companyname") = strCompany
rec("LinkWay") = strLink
rec("Title") = strTitle
rec("memo") = strQuestion
rec.Update
rec.Close
set rec = nothing
conn.Close
set conn = nothing
response.redirect "level3.htm"
%>
各位帮帮忙!! 帮我改改上面的!!!!分不多,就剩这些了!!谢谢!!