473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

mdb+asp not working on server

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
6 1893
"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
"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
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

"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
8
by: Indrid Colt | last post by:
Hi everybody, I try to migrate my Access 2003 MDB BackEnd (with data) to SQL server (MSDE 8.0) with the Access Wizard, but when i finish, all my table with a random autonumber primarykey have no...
1
by: Bob Palank | last post by:
I created a windows application, added a Grid Control and connected to the Pubs.mdb Access database locally with no trouble. Next I copied Pubs to a WebServer, changed the connection string by...
1
by: Deltronic | last post by:
Hi, situation : MDB file on SBS2003 server, used by 4 or 5 users simultaniously (on XPP pc's) witout problems. File is always in use by one of these users, so .ldb is always present. ...
0
by: jimbreau | last post by:
Re: Dreamweaver Mx 2004 ASP VBscript: 1. The following is my connection script at "conn.asp" Dim MM_connDWDynamicServer_STRING MM_connDWDynamicServer_STRING = "Driver={Microsoft Access...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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
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,...
0
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...

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.