本文介绍了帮助连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 我收到500内部服务器错误。我试过在IE中禁用show 友好错误,我在Firefox上尝试过它。它不会给我 的原因,为什么它不起作用,我只得到500内部服务器错误。我已经测试了代码到objConn点的代码,但是它有效但是当它得到了objConn.open dsn时的那是'当我得到错误的时候。我想找出为什么 它不允许它通过这一点。我控制了服务器 这是托管的地方,如果有什么我需要做的,我可以做。 请帮助! <! - #include file =" dsn.asp" - > <% Dim objConn 设置objConn = Server.CreateObject(" ADODB.Connection") objConn.open dsn< ========我的问题在这里 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ +文件:dsn.asp + ++++++++++++++ <% dim dsn dim Conn dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\Inetpub\vhosts\mydomain.com\httpdocs\_pr ivate\database\books.mdb; Jet OLEDB:Database;" ; 设置Conn = Server.CreateObject(" ADODB.Connection") Conn.Open dsn %> ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 解决方案 VSScript不会像这样工作。声明在行尾结束,除非 你明确另有说法。这个陈述看起来像这样:这样: dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data" &安培; _ " Source = C:\ Inetpub\vhosts\mydomain.com \httpdocs\_p rivate \" &安培; _ " database \ books.mdb; Jet OLEDB:数据库;" "&"是串联运算符,尾随_是串联运算符。告诉 翻译,声明在下一行继续说明 - Tim Slattery MS MVP(DTS) Sl********@bls.gov VSScript不会像这样工作。声明在行尾结束,除非您明确另有说明。这个陈述应该看起来像这样: dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data" &安培; _ 来源= C:\Inetpub \\\\\\\\\ &安培; _ " database \ books.mdb; Jet OLEDB:数据库;" "&"是串联运算符,尾随_是串联运算符。告诉翻译,声明继续在下一行 - Tim Slattery MS MVP(DTS) Sl ******** @ bls.gov momo写道: 如果错误<> 0然后 response.write err.description response.end 结束如果 Bob Barrows - Microsoft MVP - ASP / ASP.NET 请回复新闻组。我的From 标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。 Hello all, I am getting 500 Internal Server Error. I have tried disabling the showfriendly error in IE and I have tried it on Firefox. It will not give me thereason why it will not work, I only get 500 Internal Server Error. I havetested the code up to the point of Set objConn and it works but when it getsto the objConn.open dsn that''s when I get the error. I wish to find out whyit is not allowing it to get pass this point. I have control of the serverwhere this is hosted and if there is anything I need to do, I can do it.Please help! <!--#include file="dsn.asp"--><% Dim objConnSet objConn = Server.CreateObject("ADODB.Connection") objConn.open dsn <======== My Problem Is Here +++++++++++++++++++++++++++++++++++++++++++ file: dsn.asp +++++++++++ <%dim dsndim Conndsn = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Inetpub\vhosts\mydomain.com\httpdocs\_pr ivate\database\books.mdb;Jet OLEDB:Database;"Set Conn = Server.CreateObject("ADODB.Connection")Conn.Open dsn%>++++++++++++++++++++++++++++++++++++++++++ 解决方案 VSScript doesn''t work like this. Statements end at end-of-line unlessyou explicitly say otherwise. This statement should look somethinglike this: dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data" & _"Source=C:\Inetpub\vhosts\mydomain.com\httpdocs\_p rivate\" & _"database\books.mdb;Jet OLEDB:Database;" The "&" is a concatenation operator, the trailing "_" tells theinterpreter that the statement continues on the next line --Tim SlatteryMS MVP(DTS) Sl********@bls.gov VSScript doesn''t work like this. Statements end at end-of-line unless you explicitly say otherwise. This statement should look something like this: dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data" & _ "Source=C:\Inetpub\vhosts\mydomain.com\httpdocs\_p rivate\" & _ "database\books.mdb;Jet OLEDB:Database;" The "&" is a concatenation operator, the trailing "_" tells the interpreter that the statement continues on the next line -- Tim Slattery MS MVP(DTS) Sl********@bls.govif err <> 0 thenresponse.write err.descriptionresponse.endend if Bob Barrows--Microsoft MVP -- ASP/ASP.NETPlease reply to the newsgroup. The email account listed in my Fromheader is my spam trap, so I don''t check it very often. You will get aquicker response by posting to the newsgroup. 这篇关于帮助连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-26 21:03