CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

小问题,关于SQL语句,请帮忙

楼主ChinaE114(三少爷)2003-12-01 13:51:25 在 Web 开发 / ASP 提问

SQL数据库:  
   
  set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro=True")  
   
  …………  
   
  为什么会提示:列名   'True'   无效。  
  正确该如何写?? 问题点数:0、回复次数:10Top

1 楼a_zhe_20(努力工作多赚钱)回复于 2003-12-01 13:59:01 得分 0

试试  
  set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro   is   True")  
  或者  
  set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro='True'")Top

2 楼paz(广交天下朋友(ehai369@hotmail.com))回复于 2003-12-01 14:05:14 得分 0

set   rs=conn.execute"select   *   from   [File]   where   username='"&username&"'   and   ispro=True"Top

3 楼Wit253(阿狼)回复于 2003-12-01 14:07:03 得分 0

set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro<>0")Top

4 楼shleo(sky)回复于 2003-12-01 14:14:34 得分 0

你的ispro字段是什么类型?  
  是字符就加''  
  是空就用<>''  
  oracle下用is   nullTop

5 楼ChinaE114(三少爷)回复于 2003-12-01 14:16:23 得分 0

set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro<>0")  
  结果:此   ASP   页的执行造成响应缓冲区超过其配置限制。  
   
  set   rs=conn.execute("select   *   from   [File]   where   username='"&username&"'   and   ispro   is   True")  
  结果:第   1   行:   'True'   附近有语法错误。  
   
  到底要怎么做啊Top

6 楼ChinaE114(三少爷)回复于 2003-12-01 14:20:53 得分 0

字段是bit类型,数据库是SQL   Server   语言ASPTop

7 楼alexzhang00(三角猫)回复于 2003-12-01 14:23:31 得分 0

set   rs=conn.execute("select   *   from   [File]   where   username='"   &   username   &   "'   and   ispro=1")  
  Top

8 楼ChinaE114(三少爷)回复于 2003-12-01 14:29:35 得分 0

楼上的,为什么用1或者<>0来表达就提示:  
   
  此   ASP   页的执行造成响应缓冲区超过其配置限制。  
   
  数据库里只有一条记录,而整个页面也就读取了2个表而已。一个上面的表,另一个读取会员信息。Top

9 楼ChinaE114(三少爷)回复于 2003-12-01 19:10:59 得分 0

UPTop

10 楼shleo(sky)回复于 2003-12-02 09:52:16 得分 0

用ispro<>'0'Top

相关问题

  • 请教请教SQL SQL 语句语句^_^
  • SQL语句请教
  • 请教 SQL 语句
  • 请教SQL语句
  • 请教sql语句
  • sql语句请教?
  • sql语句请教
  • SQL语句请教?
  • !!!请教SQL语句!!!
  • 请教SQL语句

关键词

  • username
  • conn
  • execute
  • set rs
  • where
  • true
  • and ispro
  • select

得分解答快速导航

  • 帖主:ChinaE114

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo