ODBC driver does not support the requested properties

Linux-Torvalds 2011-05-14 10:38:34
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID = '" & NotificationID & "'"
rsImportantInfo.Open sql,conn,1,1


Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
...全文
273 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
toury 2011-05-14
  • 打赏
  • 举报
回复
调试好了,别忘记删除response.end
toury 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 linwhwylb 的回复:]

如果SELECT当中没有WHERE语句就可以。
[/Quote]
那换这个语句试试:
'如果NotificationID字段类型是数字,用下面的SQL语句
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID="¬ificationID
toury 2011-05-14
  • 打赏
  • 举报
回复
Dim rsImportantInfo
Set rsImportantInfo = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID = '" & NotificationID & "'"
'如果NotificationID字段类型是数字,应下面的SQL语句
'sql = "SELECT * FROM tblImportantInfo WHERE NotificationID="¬ificationID
response.write sql '把打印出的SQL语句拷贝到查询器走走,看什么问题
response.end
rsImportantInfo.Open sql,conn,1,1
Linux-Torvalds 2011-05-14
  • 打赏
  • 举报
回复
如果SELECT当中没有WHERE语句就可以。
Linux-Torvalds 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 buker19999 的回复:]

VBScript code

set rsImportantInfo = server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID = '" & NotificationID & "'"
rsImportantInfo.Open sql,co……
[/Quote]
这样子也不行。
<%
Dim rsImportantInfo
Set rsImportantInfo = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID = '" & NotificationID & "'"
rsImportantInfo.Open sql,conn,1,1
%>
猜我是几娃 2011-05-14
  • 打赏
  • 举报
回复

set rsImportantInfo = server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID = '" & NotificationID & "'"
rsImportantInfo.Open sql,conn,1,1
Linux-Torvalds 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 toury 的回复:]

SQL语法要求就这样,文本类型字段的连接必须用'';数字的直接就可以
[/Quote]恩,原来如此,非常感谢!结贴了。
toury 2011-05-14
  • 打赏
  • 举报
回复
SQL语法要求就这样,文本类型字段的连接必须用'';数字的直接就可以
Linux-Torvalds 2011-05-14
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 toury 的回复:]

引用 3 楼 linwhwylb 的回复:

如果SELECT当中没有WHERE语句就可以。

那换这个语句试试:
'如果NotificationID字段类型是数字,用下面的SQL语句
sql = "SELECT * FROM tblImportantInfo WHERE NotificationID="&NotificationID
[/Quote]是的,那个NotificationID类型是数字来的,这样子就好了。可以说一下为什么吗?

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧