CNET中国旗舰网站

ZDNet China | CNET科技资讯网 | 政府采购 | 行业网站联盟





 
标题: [转贴] 数据库条件访问问题
乱舞春秋 (小白)
版主
Rank: 7Rank: 7Rank: 7


UID 307017
精华 8
积分 14171
帖子 1385
威望 6402
ZD币 1890 元
阅读权限 250
注册 2008-3-13
状态 离线
  楼主
发表于 2008-4-22 15:02  资料  个人空间  短消息  加为好友 
开发者在线

数据库条件访问问题

Microsoft   OLE   DB   Provider   for   SQL   Server   (0x80040E14)   
  不能比较或排序   text、ntext   和   image   数据类型,除非使用   IS   NULL   或   LIKE   运算符。   
  /AdminTo/System.asp,   第   15   行   
   
   
  Sub   SystemForm_1()   
  Dim   TextItm,MessItm   
  TextItm   =   Request.Form("ProvinceName")   
   
  TextItm   =   split(TextItm,",")   
  For   i=0   to   ubound(TextItm)   
  If   TextItm(i)   <>   ""   then   
  rs.open   "select   *   From   [Html_Province]   where   [ProvinceName]='"&TextItm(i)&"'",conn,1,3                                           '第15行   
  If   rs.eof   and   rs.bof   then   
  rs.addnew   
  rs("ProvinceName")   =   TextItm(i)   
  rs.update   
  MessItm   =   MessItm&TextItm(i)&"             添加成功   \n"   
  Else   
  MessItm   =   MessItm&TextItm(i)&"             添加失败,数据库中已存在此省份   \n"   
  End   If   
  Rs.close   
  End   If   
  next   
  Response.Write   "<script   language=""Javascript"">"   
  Response.Write   "<!--"   
  Response.Write   "alert('"&MessItm&"')"   
  Response.Write   "-->"   
  Response.Write   "</script>"   
  End   Sub








顶部
热点频道推荐: C/S开发| 数据库| WEB开发| 嵌入式| 项目管理|
 



当前时区 GMT+8, 现在时间是 2009-1-10 09:51

  Powered by Discuz! 5.5.0 © 2001-2007 Comsenz Inc.
Processed in 0.061717 second(s), 3/3 queries

清除 Cookies - 联系我们 - ZDNetChina中文社区 - 无图版