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