By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,498 Members | 835 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,498 IT Pros & Developers. It's quick & easy.

mdb+asp not working on server

P: n/a
I have a simple database in ms access, one table with some 10-15 recordets.
When creating web page in asp (vbscript) on my local machine, which displays
the contents of access database, everything works fine (on local server,
dreamweaver, inetpub/ etc etc...).
Problem appears when i upload entire site (form my
d:\inetpub\wwwroot\site_name) to my web server. Server is based
on NT techn., all the html files appear normally, but this page in asp wont
show up (HTTP500 internal server error shows up).
Can anybody give me a hint what has to be changed? connection string? path?

Many thanks.

Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"sirius" <zu****@hotmail.com> wrote in message
news:bv**********@ls219.htnet.hr...
I have a simple database in ms access, one table with some 10-15 recordets. When creating web page in asp (vbscript) on my local machine, which displays the contents of access database, everything works fine (on local server,
dreamweaver, inetpub/ etc etc...).
Problem appears when i upload entire site (form my
d:\inetpub\wwwroot\site_name) to my web server. Server is based
on NT techn., all the html files appear normally, but this page in asp wont show up (HTTP500 internal server error shows up).
Can anybody give me a hint what has to be changed? connection string? path?
Many thanks.

It's not really an Access question - perhaps you could try one of the ASP
groups, but one suggestion is this:
If on your machine the database, was "d:\inetpub\wwwroot\site_name\MyDb.mdb"
on the new machine the file could be anywhere. Therefor make sure you use
in your connection string
"Data Source=" & Server.MapPath("MyDb.mdb")

Another common cause of grief is permissions - there must be millions of
postings on this.
Fletcher
Nov 12 '05 #2

P: n/a
"sirius" <zu****@hotmail.com> wrote in news:bv**********@ls219.htnet.hr:
I have a simple database in ms access, one table with some 10-15
recordets. When creating web page in asp (vbscript) on my local machine,
which displays the contents of access database, everything works fine
(on local server, dreamweaver, inetpub/ etc etc...).
Problem appears when i upload entire site (form my
d:\inetpub\wwwroot\site_name) to my web server. Server is based
on NT techn., all the html files appear normally, but this page in asp
wont show up (HTTP500 internal server error shows up).
Can anybody give me a hint what has to be changed? connection string?
path?


Perhaps your server is not ASP enabled?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #3

P: n/a
It sometimes helps to make a test page (test.asp or whatever) with one
simple line of code to isolate problems...

<%
response.write "If you see this, asp is enabled and working on the server"
%>

Otherwise, like Lyle... I would recommend using server.mappath wherever you
need to reference a file such as the mdb. Also, the mdb has to have write
perms.
--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"sirius" <zu****@hotmail.com> wrote in message
news:bv**********@ls219.htnet.hr...
I have a simple database in ms access, one table with some 10-15 recordets. When creating web page in asp (vbscript) on my local machine, which displays the contents of access database, everything works fine (on local server,
dreamweaver, inetpub/ etc etc...).
Problem appears when i upload entire site (form my
d:\inetpub\wwwroot\site_name) to my web server. Server is based
on NT techn., all the html files appear normally, but this page in asp wont show up (HTTP500 internal server error shows up).
Can anybody give me a hint what has to be changed? connection string? path?
Many thanks.

Nov 12 '05 #4

P: n/a

"Jerry Boone" <je***@antech.biz.killspam> wrote in message
news:Ae******************@newssvr24.news.prodigy.c om...
It sometimes helps to make a test page (test.asp or whatever) with one
simple line of code to isolate problems...

<%
response.write "If you see this, asp is enabled and working on the server"
%>

Otherwise, like Lyle... I would recommend using server.mappath wherever you need to reference a file such as the mdb. Also, the mdb has to have write
perms.
--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

Normally I have a simple page to test read-write access to the database as
well. People bring a thousand lines of code which "don't work" when a few
lines could at least make sure they have access to the database.

However, I did get caught out a while ago with the following:

http://support.microsoft.com/default...;en-us;Q251254

which explains how permissions are necessary on a temp folder as well.

I also tend to write a function which involves an On Error Resume Next
statement so I can check whether I do have a connection before I proceed,
although I am now looking at using .NET for the hopefully more useful
try/catch error handling.

.......
Set cnn = DbConnection(strError)
If Len(strError) > 0 Then ...
........
........
Function DbConnection(strError)

On Error Resume Next

Dim cnn
Dim strCnn

strError = "Unknown Error"

strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath(g_strDatabase)

Set cnn = Server.CreateObject("ADODB.Connection")

cnn.ConnectionString = strCnn

cnn.Open

If Err.Number <> 0 Then
Set cnn = Nothing
If Len(Err.Description) > 0 Then
strError = Err.Description
End If
Else
strError = ""
End if

Set DbConnection = cnn

End function

Fletcher
Nov 12 '05 #5

P: n/a
I've been using Asp.Net using VS02, then VS03 and I have to say that the new
error handling is great and the detail is there... it's just understanding
what the hell it's trying to tell me is the problem... or my problem?...

To clarify that... Try-Catch is great, minds every time, and is a
significant improvement. However, the stack trace seldom (if ever) points
out hints as to the source of the error... at least to a 9 month
developer... which could be my problem as well...

If I had it to do again I might look more seriously into using Web Matrix
because it isn't reliant on code behind dll's. You can modify it like ASP
and the changes take effect on save, unlike having to build the application
and have it give birth to a new dll that takes forever to load into the gac.
One of the more frustrating things I have also come across is that if the
web app isn't getting regular hits... it kind of goes to sleep and the gac
or something is repopulated and the user waits for about 20 seconds for this
to occur before getting a page. After that it's snappy, but none the less a
little disappointing - perhaps I will find some cure for that in the
future...

Anyway... (sigh)

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Fletcher Arnold" <fl****@home.com> wrote in message
news:bv**********@hercules.btinternet.com...

"Jerry Boone" <je***@antech.biz.killspam> wrote in message
news:Ae******************@newssvr24.news.prodigy.c om...
It sometimes helps to make a test page (test.asp or whatever) with one
simple line of code to isolate problems...

<%
response.write "If you see this, asp is enabled and working on the server" %>

Otherwise, like Lyle... I would recommend using server.mappath wherever

you
need to reference a file such as the mdb. Also, the mdb has to have write perms.
--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and Access

Normally I have a simple page to test read-write access to the database as
well. People bring a thousand lines of code which "don't work" when a few
lines could at least make sure they have access to the database.

However, I did get caught out a while ago with the following:

http://support.microsoft.com/default...;en-us;Q251254

which explains how permissions are necessary on a temp folder as well.

I also tend to write a function which involves an On Error Resume Next
statement so I can check whether I do have a connection before I proceed,
although I am now looking at using .NET for the hopefully more useful
try/catch error handling.

......
Set cnn = DbConnection(strError)
If Len(strError) > 0 Then ...
.......
.......
Function DbConnection(strError)

On Error Resume Next

Dim cnn
Dim strCnn

strError = "Unknown Error"

strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath(g_strDatabase)

Set cnn = Server.CreateObject("ADODB.Connection")

cnn.ConnectionString = strCnn

cnn.Open

If Err.Number <> 0 Then
Set cnn = Nothing
If Len(Err.Description) > 0 Then
strError = Err.Description
End If
Else
strError = ""
End if

Set DbConnection = cnn

End function

Fletcher

Nov 12 '05 #6

P: n/a
"Jerry Boone" <je***@antech.biz.killspam> wrote in message
news:j3******************@newssvr24.news.prodigy.c om...
I've been using Asp.Net using VS02, then VS03 and I have to say that the new error handling is great and the detail is there... it's just understanding
what the hell it's trying to tell me is the problem... or my problem?...

To clarify that... Try-Catch is great, minds every time, and is a
significant improvement. However, the stack trace seldom (if ever) points
out hints as to the source of the error... at least to a 9 month
developer... which could be my problem as well...

If I had it to do again I might look more seriously into using Web Matrix
because it isn't reliant on code behind dll's. You can modify it like ASP
and the changes take effect on save, unlike having to build the application and have it give birth to a new dll that takes forever to load into the gac. One of the more frustrating things I have also come across is that if the
web app isn't getting regular hits... it kind of goes to sleep and the gac
or something is repopulated and the user waits for about 20 seconds for this to occur before getting a page. After that it's snappy, but none the less a little disappointing - perhaps I will find some cure for that in the
future...

Anyway... (sigh)

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access


Well, I've got all that to look forward to - I'm just starting to look at
ASP.NET. I am still unsure as to whether there is a pressing need to change
to ADO.NET at the same time as converting the pages to ASP.NET. The number
of times these data access methods and models change really does make it
hard for the lazy programmer to keep up.

Fletcher
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.