帮助连接 [英] Help connection

查看:71
本文介绍了帮助连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



大家好,


我收到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

%>

++++++++++++++++++++++++++++++++++++++++++++++++++++++

解决方案
" MOMO" <毫安*** @ seeourweb.com>写道:

++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++ + + + + + + + + + + + + + + + + + + + + + + dim dsn
dim Conn
dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data
Source = C:\Inetpub\vhosts\mydomain.com\httpdocs \\ _p rivate\database\books.mdb;
Jet OLEDB:数据库;



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


感谢Tim的回复。声明是连续的。奇怪的是

的事情是dsn.asp在另一个.asp页面中使用时有效。


dsn =" Provider = Microsoft.Jet.OLEDB.4.0 ;数据

源= C:\Inetpub \vhosts \mydomain.com \httpdocs \ _pr ivate \database \ books.mdb;

Jet OLEDB:数据库;

Tim Slattery" < S1中******** @ bls.gov>在消息中写道

news:kr ******************************** @ 4ax.com ...

" momo" <毫安*** @ seeourweb.com>写道:

++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++ + + + + + + + + + + + + + + + + + + + + + + dim dsn
dim Conn
dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data
Source = C:\Inetpub\vhosts\mydomain.com\httpdocs \\ _ private\database\books.mdb;
Jet OLEDB:数据库;



VSScript不会像这样工作。声明在行尾结束,除非您明确另有说明。这个陈述应该看起来像这样:

dsn =" Provider = Microsoft.Jet.OLEDB.4.0; Data" &安培; _
来源= C:\Inetpub \\\\\\\\\ &安培; _
" database \ books.mdb; Jet OLEDB:数据库;"

"&"是串联运算符,尾随_是串联运算符。告诉
翻译,声明继续在下一行

-
Tim Slattery
MS MVP(DTS)
Sl ******** @ bls.gov



< blockquote> momo写道:

大家好,

我收到500内部服务器错误。我试过在IE中禁用
show友好错误,我在Firefox上尝试过它。它不会给我它无法工作的原因,我只得到500内部服务器错误。


听起来好像你必须使用IIS管理器在网站上关闭它。

除此之外,你需要使用一些错误捕获发现错误


错误恢复下一次objConn.open dsn< ========我的问题在这里



如果错误<> 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 show
friendly error in IE and I have tried it on Firefox. It will not give me the
reason why it will not work, I only get 500 Internal Server Error. I have
tested the code up to the point of Set objConn and it works but when it gets
to the objConn.open dsn that''s when I get the error. I wish to find out why
it is not allowing it to get pass this point. I have control of the server
where this is hosted and if there is anything I need to do, I can do it.
Please help!

<!--#include file="dsn.asp"-->
<%

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")

objConn.open dsn <======== My Problem Is Here

++++++++++++++++++++++++++++++++++++++++++
+ file: 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;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open dsn
%>
++++++++++++++++++++++++++++++++++++++++++

解决方案

"momo" <ma***@seeourweb.com> wrote:

++++++++++++++++++++++++++++++++++++++++++
+ file: dsn.asp +
++++++++++

<%
dim dsn
dim Conn
dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\vhosts\mydomain.com\httpdocs\_p rivate\database\books.mdb;
Jet OLEDB:Database;"


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.gov


Thanks Tim for replying. The statement is on continious line. The strange
thing is that dsn.asp works when used in another .asp page.

dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\vhosts\mydomain.com\httpdocs\_pr ivate\database\books.mdb;
Jet OLEDB:Database;"
"Tim Slattery" <Sl********@bls.gov> wrote in message
news:kr********************************@4ax.com...

"momo" <ma***@seeourweb.com> wrote:

++++++++++++++++++++++++++++++++++++++++++
+ file: dsn.asp +
++++++++++

<%
dim dsn
dim Conn
dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\vhosts\mydomain.com\httpdocs\_ private\database\books.mdb;
Jet OLEDB:Database;"


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.gov



momo wrote:

Hello all,

I am getting 500 Internal Server Error. I have tried disabling the
show friendly error in IE and I have tried it on Firefox. It will not
give me the reason why it will not work, I only get 500 Internal
Server Error.
It sounds as if you have to turn it off at the web site using IIS Manager.
Barring that, you will need to use some error-trapping to find the error

on error resume next objConn.open dsn <======== My Problem Is Here


if err <> 0 then
response.write err.description
response.end
end if

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


这篇关于帮助连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆