关于ASP中查询语句的问题
写了一个SQL语句,用于更新数据表,请各位看看是否是正确的。谢谢了。
SQL code:
set sql=conn.exeucte("update table1 set otherinfo ='该产品已于'" & today & "'由'" & customer & "'转移至'" & Ncustomer & "'' where table1.keyword='" & keyword & "'")
set sql=nothing
其中 today customer Ncustomer keyword都是变量。
VBScript code:
conn.exeucte("update table1 set otherinfo ='该产品已于" & today & "由" & customer & "转移至" & Ncustomer & "' where keyword='" & keyword & "'")
最好按下面这个写:
VBScript code:
conn.exeucte("update table1 set otherinfo ='该产品已于" & replace(today,"'","''") & "由" & replace(customer,"'","''") & "转移至" & replace(Ncustomer,"'","''") & "' where keyword='" & replace(keyword,"'","''") & "'")
<
相关问答:
我有一个asp源码,但是出现一个文件,我用asp解密都是乱码
请教
VBScript code:
??
%# , #&')*)-0-(0%()(?
(((((((((((((((((((((((((( ......
<%if request.QueryString("start") <>"" then%>
<%if cint(start)>0 then%>
<a href="search.asp?q= <%=q%>&start= <%if request.Query ......
文件:folder.inc
HTML code:
<%
Dim folderini,pos,pageName
fPath = Request.ServerVariables("PATH_TRANSLATED")
pos = instrRev(fPath,"\")
folderini = Left(fPath,pos)+&qu ......
请各位高手帮解决,急!!!
<script language="JavaScript" type="text/javascript">
function CheckInput(){
if (document.frm.loginname.length =0){
alert('请正 ......
asp下面,当要根据不同的权限显示一些功能按钮的话会写成
<%
if 权限=1 then
%>
<input type="submit" name="Submit" value="提交" />
<%
end i ......