本文介绍了连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 对不起这个交叉点(我昨晚在asp.db组上发布了这个)。但是因为我在那里没有回答,所以我希望能有更好的运气。我很漂亮 我尝试了很多东西。这就是问题: 我在工作中有一个基于Intranet的应用程序,我在那里有两个地方:一个 dev机器和一个生产箱。在这两种情况下,ASP文件和SQL Server 2000数据库都在同一个盒子上。我在工作中的两个地方都能顺利运行。 然而,我一直试图在家中进行设置,并且不能使SQL 由于某种原因,服务器连接工作。几个星期以来,我一直在努力工作,而且我只是花了几个星期,而我只是没有得到我所缺少的东西。 首先,我的代码: <! - #INCLUDE FILE =" includes / dbinc.asp" - > 指向只包含以下行的页面: =================== ==== <% Dim strDBConnection strDBConnection = _ " Provider = SQLOLEDB; " &安培; _ " Persist Security Info = False;" &安培; _ " Data Source = w2003\ticketlog;" &安培; _ " User ID = asp;" &安培; _ " Password = asp;" &安培; _ " Database = argonet;" Dim objConnection 设置objConnection = Server.CreateObject(" ADODB.Connection") objConnection.Open strDBConnection %> ==================== ========== 此时我应该补充一点,这段代码就像我的东西中的 工作代码一样工作。只有名称已被更改。我还要在家里添加这个,我正在处理的机器已经是名为W2003的,所以当我设置SQL Server时,它命名为实例 W2003 \TICKETLOG。(Windows NT)。是的,它有括号中的那一部分。 我不认为斜线是问题。 无论如何,这是我看到的信息在浏览器中,当我尝试访问任何调用此连接代码的 页面时。 ================= =================== 用于SQL Server的Microsoft OLE DB提供程序错误''80040e4d'' 登录失败对于用户''asp''。 /ticketlog/includes/argodbinc.asp,第15行 =============== ===================== 我想补充说我确实去了EP的服务器,去了安全然后 双击用户名为asp,然后转到数据库选项卡以确保确认了db_owner和其他所有内容的。然后我为 INETUSER做了同样的事。 好的,所以假装我之前从未做过任何这样的事情。我需要采取哪些步骤来设置这个东西?b $ b在我的情况下,我确实添加了一个名为asp的用户并给出了完整的 权限,但我认为我没有这样做。也许有详细的 手持指令,我会看到我缺少的东西。 解决方案 Sorry for the crosspost (I posted this on the asp.db group last night). Butsince I had no answer there, I''m hoping for better luck here. I''m prettymuch tried everything I know. Here''s the problem:I have an Intranet-based app at work, and I have it in two places there: adev machine and a production box. In both cases, the ASP files and SQLServer 2000 database are on the same box. I have it running smoothly in bothplaces at work.However, I''ve been trying to set it up at home, and cannot make the SQLServer connection work for some reason. I''ve been working on this off and onfor weeks, and I just don''t get what I am missing.First, my code:<!-- #INCLUDE FILE="includes/dbinc.asp" -->which points to a page contaning only the followig lines:=======================<%Dim strDBConnectionstrDBConnection = _"Provider=SQLOLEDB;" & _"Persist Security Info=False;" & _"Data Source=w2003\ticketlog;" & _"User ID=asp;" & _"Password=asp;" & _"Database=argonet;"Dim objConnectionSet objConnection = Server.CreateObject("ADODB.Connection")objConnection.Open strDBConnection%>==============================It''s at this point that I should add that this code is just like theworking code from my stuff at work. Only the names have been changed. Ishould also add that here at home, the machine I am working on has beennamed "W2003", so when I set up SQL Server, it named the instanceW2003\TICKETLOG.(Windows NT). Yes, it has that part with the parentheses.I don''t think the slash is the problem.Anyway, here is the message I see in the browser when I try to get to anypage which calls this connection code.====================================Microsoft OLE DB Provider for SQL Server error ''80040e4d''Login failed for user ''asp''./ticketlog/includes/argodbinc.asp, line 15====================================I want to add that I did go to the server in EP, went to Security, thendoule-clicked the user called asp, and went to the database tab to make surethat db_owner and everything else is checked. I then did the same forINETUSER.Ok, so pretend I have never done any of this before. What steps do I need toset up this thing? In my case, I did add a user named asp and gave fullpermissions, but assume I haven''t done that. Perhaps with detailedhand-holding instructions, I''ll see what I am missing. 解决方案 这篇关于连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 02:15