Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 27th, 2007, 07:53 AM
Registered User
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default error displaying asp page

Hope somebody here can help me before i tear all my hair out... (you know the filing, a?)

Here's my problem:
I am developing a web page, where only a part will have asp (for news). And the whole things works fine on my local server, but not on my remote server.
I can access the admin pages also on the remote server, can add new data, update them... But when i want to access the asp page where the data should appear, I get an error and the page doesn't display.

The error message says:
Microsoft JET Database Engine error '80004005'

'D:\inetpub\wwwroot_novo\fakulteta\studentske_stra ni\bibliotekarstvo\database\bink.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

/fakulteta/studentske_strani/bibliotekarstvo/bink_asp2/oglasna.asp, line 9

In line 9 of the page that does not display says: rsPosts_cmd.ActiveConnection = MM_connBink_STRING

And my string is written like this:
Dim MM_connBink_STRING
MM_connBink_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/database/bink.mdb") & " ; User ID=; Password=;"

Does anyone has any idea how to solve this problem??? I would be most grateful... I suspect that the problem is somewhere in the path as according to my logic and the structure of the page the following link is not correct (it should also contain the text in red]:

'D:\inetpub\wwwroot_novo\fakulteta\studentske_stra ni\bibliotekarstvo\bink_asp2\database\bink.mdb'

What do you think?

Old November 27th, 2007, 11:13 PM
Registered User
Join Date: Oct 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mperry

I would really need to see the code to determine what the problem really is. If its already working on other pages it certainly isn't the ODBC connection on the remote server.

How do you call the database on each page. Are you using includes. Having the code would help me better give a solution to your problem.

Old November 27th, 2007, 11:54 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

mmmmmmm Access connection strings, reminds me of headaches....

The first error tells you the problem is on line 9, therefore there is a real good chance its your connection string. Try:

MM_connBink_STRING = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/database/bink.mdb")

The above connection string is from a woring site, should do it for you. connectionstring.com is the lace to go for the best advice. After reading your last comment you have clearly found the problem, its a path issue in your connection string...

Wind is your friend
Old November 28th, 2007, 01:56 AM
Registered User
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

mat41: tried your suggestion, but unfortunately it doesn't work. I can not even access my admin pages as it gives me an error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xc24 Thread 0x568 DBC 0xc70e8b4 Jet'.

/fakulteta/studentske_strani/bibliotekarstvo/bink_asp2/admin/Default.asp, line 24

Will try looking on that web page.

Old November 28th, 2007, 02:06 AM
Registered User
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

well it's working only on my local server, so i don't know... may be the connection string. At least when i couldn't access the admin pages I had to change my string (found the solution on this forum) and than it almost worked.

Here is the code from my "oglasna.asp", the page where news I add on admin pages should appear:


Dim rsPosts
Dim rsPosts_cmd
Dim rsPosts_numRows

Set rsPosts_cmd = Server.CreateObject ("ADODB.Command")
rsPosts_cmd.ActiveConnection = MM_connBink_STRING
rsPosts_cmd.CommandText = "SELECT dtePostDate, intCatID, intPostID, memPostText, txtPostTitle FROM tblObvestila ORDER BY dtePostDate DESC"
rsPosts_cmd.Prepared = true

Set rsPosts = rsPosts_cmd.Execute
rsPosts_numRows = 0
Dim rsCategories
Dim rsCategories_cmd
Dim rsCategories_numRows

Set rsCategories_cmd = Server.CreateObject ("ADODB.Command")
rsCategories_cmd.ActiveConnection = MM_connBink_STRING
rsCategories_cmd.CommandText = "SELECT intCatID, txtCatName FROM tblCategory ORDER BY intCatSort ASC"
rsCategories_cmd.Prepared = true

Set rsCategories = rsCategories_cmd.Execute
rsCategories_numRows = 0
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsPosts_numRows = rsPosts_numRows + Repeat1__numRows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<%=(rsCategories.Fields.Item("txtCatName").Value)% ></p>

While ((Repeat1__numRows <> 0) AND (NOT rsPosts.EOF))
      <div id="post">

        <p class="date"><%=(rsPosts.Fields.Item("dtePostDate" ).Value)%></p>
        <p class="obvestilo"><b><%=(rsPosts.Fields.Item("txtP ostTitle").Value)%></b><br />
            <%= Replace(rsPosts.Fields.Item("memPostText").Value, Chr(10), "<br />")%></p>

Old November 28th, 2007, 02:29 AM
Registered User
Join Date: Nov 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

I just tries the simplest solution and it actually works.

I changed my connection string datasource:

Data Source='D:\inetpub\wwwroot_novo\fakulteta\students ke_strani\bibliotekarstvo\bink_asp2\database\bink. mdb'

So I took the path given by the error and added the missing \bink_asp2\. Everything works now, so this was actually the problem. But I don't know if the solution is really good as it largely depends on the location of the folder on the server. Is there any better way or is this it?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying XML format on ASP page GS ASP.NET 2.0 Basics 1 August 31st, 2007 08:33 PM
displaying images in form page using ASP.net louie001 ASP.NET 1.0 and 1.1 Basics 0 February 23rd, 2006 06:26 AM
ASP page not displaying null values imercha Classic ASP Basics 1 January 19th, 2006 02:38 AM
displaying charts on an ASP page vik_asp Classic ASP Basics 1 August 6th, 2003 01:45 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.