这段代码为什么不能保存到sql数据库里?
<!--#include file="dbpath/dbpath.asp"-->
<!--#include file="function/char.inc"-->
<%
sub getInput()
sSubject=request.form("dSubject")
sMemo=request.form("dMemo")
sGq=request.form("dgq")
sName=request.form("dname")
sAddress=request.form("daddress")
sCode=request.form("dcode")
stypeid=request.form("lbmc")
sgs=request.form("dgs")
end sub
dim rs
dim sSubject
dim sMemo
dim sGq
dim sName
dim sAddress
dim sCode
dim stypeid
dim sgs
dim errorMsg
dim foundError
getInput()
saveData()
if foundError=false then
response.redirect "manage.asp"
else
call showerrors()
end if
set rs=nothing
conn.close
set conn=nothing
sub saveData()
dim InsertCursor
Set InsertCursor = Server.CreateObject("ADODB.Recordset")
InsertCursor.Open "select * from gq",conn,1,3
InsertCursor.addnew
InsertCursor("name") =htmlencode(sName)
InsertCursor("address") =htmlencode(sAddress)
InsertCursor("code") =htmlencode(sCode)
InsertCursor("subject") =htmlencode(sSubject)
InsertCursor("memo") =htmlencode(sMemo)
InsertCursor("gs") =htmlencode(sgs)
InsertCursor("gq") =sGq
InsertCursor("lbid") =stypeid
InsertCursor("gqdate") =cstr(date())
InsertCursor("gqtime") =cstr(time())
InsertCursor.Update
InsertCursor.close
if err>0 then
err.clear
foundError=true
ErrorMsg="<li>Êý ¾Ý ¿â ²Ù ×÷ ʧ °Ü !</li>"
else
foundError=false
end if
end sub
sub showErrors()
%>