文心雕龙第九届txt下载:sql调用的问题

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 21:01:13
以前access数据库就是这样调用的
sql = "select Top 6 * from touzi where shenghe=true and del=false order by top,id desc"
我换成sql以上,提示
Microsoft OLE DB Provider for SQL Server (0x80040E14)
列名 'true' 无效。
需要改什么呀
不行,是不access转换成sql以后,就要换成shenghe=1 and del=0

楼主的猜想没错,true和false不是SQL SERVER中表示真假的关键字,
SQL SERVER中表示真假的数据类型是bit类型,它的取值为0或1
你的语句就是需要用shenghe=1 and del=0

shenghe is true and del is false
如果是逻辑型

楼上绝对正确

0和1