幫我調試一下,出錯在哪里?

yuanzmeng 2001-10-27 09:59:17
<%
connstrr="link"
set connt=server.createobject("ADODB.connection")
response.write "good"
connt.open connstrr
sql="select * from b_person"
set rs=connt.execute(sql)
rs.movefirst
Do While Not rs.Eof
response.write("工號,姓名")
response.write rs("code")
response.write rs("name")
rs.movenext
loop
rs.colse
%>

結果是
- good
Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

/repair.asp, 列10
...全文
311 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuanzmeng 2001-10-27
  • 打赏
  • 举报
回复
我的LINK連接已經有user\passwd,
按照無為老兄的方法,沒有出錯,但是WEB結果是原代碼,而不是select 的內容,為什么?

cnhalo 2001-10-27
  • 打赏
  • 举报
回复
无为老兄,帮我一下好不好,关于Imail的帖子
karma 2001-10-27
  • 打赏
  • 举报
回复
you did not send authentication info, if you use SQL login, try

connt.open connstrr, "sa", ""
cnhalo 2001-10-27
  • 打赏
  • 举报
回复
connstrr="link"
link里包含usert和passwd信息吗?

tonnycncn 2001-10-27
  • 打赏
  • 举报
回复
错误80004005信息处理方法
http://www.csdn.net/develop/read_article.asp?id=6668
yzfx 2001-10-27
  • 打赏
  • 举报
回复
你还是先SET一个记录集吧。
set rs=server.CreateObject("ADODB.RecordSet")
rs=connt.execute(sql)
xiaowangzi 2001-10-27
  • 打赏
  • 举报
回复
数据库设置出错了!你是不是不允许空字段?
yzfx 2001-10-27
  • 打赏
  • 举报
回复
还是错了。

28,391

社区成员

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

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