select * from 变量 where 变量
如题,当表名与查询条件都是变量时该怎么写!谢谢!!
[解决办法]
sSQL = "Select * From " & TableName & "Where Field = '" & FieldsValue & "'"
objRecordSet.Open sSQL
[解决办法]
<%dim sql't是表名,num和str都是字段名,前者是数字后者是文本sql="select * from" & t & " where num=" &num &" and str='" & str &"'"rs=conn.execute(sql)%>