真红眼之暗铁龙卡片:ASP高手帮忙看看

来源:百度文库 编辑:高考问答 时间:2024/04/26 21:55:04
ID=cint(request("id"))
rs.open"select * from liuyan where id='"&ID&"'",conn,1,1

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。

通过直接显示ID的值是3,我直接用3代进去
rs.open"select * from liuyan where id=3",conn,1,1
运行正常,ID不转为数字
ID=request("id")
也还是不行,到底错在哪里呢?

ID是否为数字?
如果是
rs.open"select * from liuyan where [id]="&IDconn,1,1
不是
rs.open"select * from liuyan where [id]='"&ID&"'",conn,1,1

检查一下提供ID的网页,可能是并没有一个ID值传输到这个网页,所以不存在request("id"),可以试一下用隐藏域将ID的制从上一个程序传输过来。

数字不用用''
''用来表示字符串 的。

不明白

改成
rs.open"select * from liuyan where id="&ID&"",conn,1,1