我需要传递生成的sql字符串和查询数据库,并需要从中获取数据。
dim sql,spack
spack="test"
sql="select * from dbo.packageName A where a.custname=" & spack
set rs = getRs(sql)此代码语句返回错误。你能给我解释一下如何像上面的代码段一样传递参数(参数spack)。
发布于 2013-04-22 16:01:32
应用单引号将变量括起来
sql="select * from dbo.packageName A where a.custname='" & spack & "'"https://stackoverflow.com/questions/16142114
复制相似问题