473,499 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help connection


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
%>
++++++++++++++++++++++++++++++++++++++++++
Mar 3 '06 #1
13 1446
"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
Mar 3 '06 #2
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

Mar 3 '06 #3
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.
Mar 3 '06 #4
Thanks Bob,

I tried that and got error "Could not use ''; file already in use." I could
not find where it is in use. Could you help and could you tell me how to
turn it on in IIS Manager.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
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.

Mar 3 '06 #5
momo wrote:
Thanks Bob,

I tried that and got error "Could not use ''; file already in use." I

This is usually a permission problem: all users of an mdb file need Modify
permissions for the folder containing the file, not just the file itself. If
your site uses Anonymous access, then you need to grant this permission to
the IUSR_machinename account.

could not find where it is in use. Could you help and could you tell
me how to turn it on in IIS Manager.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
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.


--
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.
Mar 3 '06 #6
momo wrote:
Could you help and could you tell
me how to turn it on in IIS Manager.


It's in the Application Configuration dialog in the Debugging tab
--
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.
Mar 3 '06 #7
Thanks Bob,

That did it. The permission on the folder.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
momo wrote:
Thanks Bob,

I tried that and got error "Could not use ''; file already in use." I

This is usually a permission problem: all users of an mdb file need Modify
permissions for the folder containing the file, not just the file itself.
If
your site uses Anonymous access, then you need to grant this permission to
the IUSR_machinename account.

could not find where it is in use. Could you help and could you tell
me how to turn it on in IIS Manager.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
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.


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

Mar 3 '06 #8
In the debugging tab "Send detail ASP error messages to clients" is already
selected. But it still does not show me the error. Do I have to check either
of the two boxes under "Debugging flags"?
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
momo wrote:
Could you help and could you tell
me how to turn it on in IIS Manager.


It's in the Application Configuration dialog in the Debugging tab
--
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.

Mar 3 '06 #9
No.
As long as the browser is configured correctly, you should receive the
detailed errors.

You should probably be using error-trapping anyways. Many users find it very
jarring to be sent to the generic error pages.
momo wrote:
In the debugging tab "Send detail ASP error messages to clients" is
already selected. But it still does not show me the error. Do I have
to check either of the two boxes under "Debugging flags"?
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
momo wrote:
Could you help and could you tell
me how to turn it on in IIS Manager.


It's in the Application Configuration dialog in the Debugging tab
--
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.


--
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.
Mar 3 '06 #10
Thanks Bob,

But I find it very odd that it is not working for me. As I mentioned
earlier, I have tried unchecking the "show friendly error" box in IE and I
have Firefox and it still does not show me the error. Anything else you
could suggest?

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
No.
As long as the browser is configured correctly, you should receive the
detailed errors.

You should probably be using error-trapping anyways. Many users find it
very
jarring to be sent to the generic error pages.
momo wrote:
In the debugging tab "Send detail ASP error messages to clients" is
already selected. But it still does not show me the error. Do I have
to check either of the two boxes under "Debugging flags"?
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
momo wrote:
Could you help and could you tell
me how to turn it on in IIS Manager.

It's in the Application Configuration dialog in the Debugging tab
--
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.


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

Mar 3 '06 #11
Sorry, I've never had to do anything else.

Bob Barrows

momo wrote:
Thanks Bob,

But I find it very odd that it is not working for me. As I mentioned
earlier, I have tried unchecking the "show friendly error" box in IE
and I have Firefox and it still does not show me the error. Anything
else you could suggest?


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 4 '06 #12
"Bob Barrows [MVP]" wrote in message
news:Oa**************@TK2MSFTNGP14.phx.gbl...
: Sorry, I've never had to do anything else.

Do you have to restart the web site after making the change in IIS?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Mar 4 '06 #13
Roland Hall wrote:
"Bob Barrows [MVP]" wrote in message
news:Oa**************@TK2MSFTNGP14.phx.gbl...
Sorry, I've never had to do anything else.


Do you have to restart the web site after making the change in IIS?


Not that I recall - pressing the Apply button sufficed iirc. But it can't
hurt ...
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 4 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
297
by: Naren | last post by:
Victor Bazarov <v.Abazarov@comAcast.net> wrote: >Naren wrote: >> MyServer class conatins a list of Mysock class. >> >> class Myserver >> { >> private: >> list<Mysock> L1; >> }; >>
2
4415
by: Jozef | last post by:
Hello, I'm trying to create a central function that runs a connection to an SQL Server database. The connection etc works, but when I try to call it, I get an error saying "Runtime-Error 91:...
2
2281
by: Lior | last post by:
Hi, I have an ASP.NET website that crashes under heavy load. I use a SQL Server DB. I get around 5500 hits per day. I keep getting the timeout expieried connection pool error. Sometimes it even...
2
2416
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn...
15
2060
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual...
6
4957
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
14
6994
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
2
2651
by: BlackKite | last post by:
I have this script I wrote up as a php backend. But its throwing some errors i dont quite understand. Hope someone can help me fix this. Please Error: Line 52: ftp_fput($connection, $bandle,...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
13
5762
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.