行政处罚无效的依据有:ASP sql server问题

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 16:41:59
我想将access转为SQL SERVER,但是类型:是/否,这里不知要怎样改,如:
set rsa=server.createobject("adodb.recordset")
sql="select * from admintable where admin_name='"&user&"'and password='"&password&"' and check=true"
rsa.open sql,conn,1,3
我在sql server中创建同名的字段check设为char类型,但是按上面的语句或是改成:check='"&true&"'都不成功,请问要改样改?谢谢

你这样写肯定不行,因为check='"&true&"'是把 true 作为一个变量来处理,你程序里没定义当然不行,你直接作为字符串就行 sql="select * from admintable where admin_name='"&user&"'and password='"&password&"' and check='true'"

二楼的说的有道理!

check='ture'就可以了