ASP中如何把变量赋给SELECT语句
代码如下:<%dimii=6setconn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft...
代码如下:
<%
dim i
i=6
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "englishword.mdb"
sql="SELECT * FROM cetsix WHERE ID='&i&'"
Set rs=conn.Execute(sql)
word=(rs("words"))
mean=(rs("meanings"))
response.write(word)
response.write(mean)
%>
如何把 i 赋给WHERE语句 展开
<%
dim i
i=6
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "englishword.mdb"
sql="SELECT * FROM cetsix WHERE ID='&i&'"
Set rs=conn.Execute(sql)
word=(rs("words"))
mean=(rs("meanings"))
response.write(word)
response.write(mean)
%>
如何把 i 赋给WHERE语句 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询