还有人对ASP SQL比较熟悉的啊?
<%dim shdh,ddh,gysbh,shrq,shjgbh,spbh,sptm,shsl,zpsl,jhdj,zkje,hsjjje,se,sl,fplx
shdh=request.form("shdh")
if shdh="" then
response.write "送货单号,不能为空"
else
ddh=request.form("ddh")
gysbh="as04"
shrq=request.form("shrq")
shjgbh=request.form("shjgbh")
spbh=request.form("spbh")
sptm=request.form("sptm")
shsl=request.form("shsl")
zpsl=request.form("zpsl")
jhdj=request.form("jhdj")
zkje=request.form("zkje")
hsjjje=shsl * jhdj
se=hsjjje/1.17*0.17
sl=0.17
fplx="05"
dim ngssbh1
ngssbh1="select ngssbh from dnm where asspbh like %"& request.form("spbh") &"% "
dim sqlstr
sqlstr="insert into ngssh(shdh,ddh,gysbh,shrq,shjgbh,spbh,sptm,shsl,zpsl,jhdj,zkje,hsjjje,se,sl,fplx) values('" &
shdh & "','" & ddh & "','" & gysbh & "','" & shrq & "','" & shjgbh & "','" & ngssbh1 & "','" & sptm & "','" & shsl & "','" &
zpsl & "','" & jhdj & "','" & zkje & "','" & hsjjje & "','" & se & "','" & sl & "','" & fplx & "')"
set conn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
conn.open"provider=sqloledb;datasource=localhost;uid=sa;pwd=sa;database=ngs"
conn.execute sqlstr
rs.open ngssbh1,conn,3,3
while not rs.eof and not rs.bof
conn.close
set conn=nothing
rs.movenext
wend
rs.close
set rs=nothing
response.write "OK"
end if
%>
执行的时候提示“将截断字符串或二进制数据。
/submit.asp, 第 36 行
或
”ngssbh1="select ngssbh from dnm where asspbh like '%"& request.form("spbh") &"%' "“
提示错误”在此上下文中不允许使用 'k5722'。此处只允许使用常量、表达式或变量。不允许使用列名。
/submit.asp, 第 36 行
我想这里应该有不少高手的吧! Armament System and Procedures Lnc ngssbh1="select ngssbh from dnm where asspbh like %"& spbh &"% " 你定义的时候 最好把类型加上 这个应该怎么加啊? 好像是DIM VALUE AS TYPE
dim a as char
dim b as string
如果我没有记错的话
页:
[1]