Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 March 9th, 2004, 05:02 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot Connect to Access DB

I am a new user and just starting out with "ASP" I purchased the book (ASP 3.0), I am working on chapter "15" and trying to test the classified program.
Here is my problem: I get the default page fine, login and new user page is coming up fine. However, when I try to open the "Browse listing page" I am getting an "HTTP 500" error. So I changed the default connection string from e:/... to my Access DB location (c:\inetpup\wwwroot\classified\_private\classified _2000.mdb
in the ASP "clssfd.asp" file. Also I changed the location string for the "MSado15.dll" to:. Still the same problem, getting the same error: Cannot find file.
Please help, am lost.
 
Old March 9th, 2004, 05:06 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you be more specific about the error code? Is it a 500 code, or a 404 (file not found)? Can you post the entire message?

Also, can you post the code of the page you're working with? I don't have the book, so I don't know what Chapter 15 is talking about....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 05:26 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for your reply,her is the error page:

.................................................. ..................
 The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the classified home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.

HTTP 500 - Internal server error
Internet Explorer
.................................................. ...................

Here is the code for the DB connection string: Straig of the website.
For your convineance here is a link for the chapter 15 download:http://www.p2p.wrox.com/dynamic/books/download.aspx

<!-- METADATA TYPE="typelib"
              FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
  Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb

  If Session("blnValidUser") = True and Session("affilID") = "" Then
    Dim rsaffilIDCheck
    Set rsaffilIDCheck = Server.CreateObject("ADODB.Recordset")
    Dim strSQL
    strSQL = "SELECT affilID FROM Vendors " & _
             "WHERE affilID = '" & Session("affilID") & "';"
    rsaffilIDCheck.Open strSQL, objConn
    If rsaffilIDCheck.EOF Then
      Session("blnValidUser") = False
    Else
      Session("affilID") = rsaffilIDCheck("affilID")
    End If
    rsaffilIDCheck.Close
    Set rsaffilIDCheck = Nothing
  End If
   'C:\Inetpub\wwwroot\bid\_private/classified_2000.mdb" changed from the top connection
%>
.................................................. .................
Thank you very much for your help...)

 
Old March 9th, 2004, 05:30 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It looks like you're not getting really detailed error info. To improve the quality of the error messages, turn off "Friendly Error Messages" (Hi, good afternoon, I'll be your error message for the day; how may I help you):

In Internet Explorer, open the Advanced tab of the Options dialog, and uncheck "Show friendly HTTP error messages". For your Web site in IIS, open the Properties dialog, switch to the Home Directory tab, and click the Configuration button. On the Debugging tab, make sure "Send detailed ASP error messages to the client" is checked.
Then run the page, and see if you get any error information.

Can you post the detailed error message you get here?

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 06:58 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes let me do this right now, I will email the results here in a few minutes. thanks again for helping:)



Quote:
quote:Originally posted by Imar
 It looks like you're not getting really detailed error info. To improve the quality of the error messages, turn off "Friendly Error Messages" (Hi, good afternoon, I'll be your error message for the day; how may I help you):

In Internet Explorer, open the Advanced tab of the Options dialog, and uncheck "Show friendly HTTP error messages". For your Web site in IIS, open the Properties dialog, switch to the Home Directory tab, and click the Configuration button. On the Debugging tab, make sure "Send detailed ASP error messages to the client" is checked.
Then run the page, and see if you get any error information.

Can you post the detailed error message you get here?

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 07:00 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the error message:
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/Clssfd.asp, line 7

"Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb
--------------------------------------------------------------^




Quote:
quote:Originally posted by Imar
 It looks like you're not getting really detailed error info. To improve the quality of the error messages, turn off "Friendly Error Messages" (Hi, good afternoon, I'll be your error message for the day; how may I help you):

In Internet Explorer, open the Advanced tab of the Options dialog, and uncheck "Show friendly HTTP error messages". For your Web site in IIS, open the Properties dialog, switch to the Home Directory tab, and click the Configuration button. On the Debugging tab, make sure "Send detailed ASP error messages to the client" is checked.
Then run the page, and see if you get any error information.

Can you post the detailed error message you get here?

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 07:02 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the line 7 error in the file "Clssfd"
 Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb
.................................................. ...................


Quote:
quote:Originally posted by mjmfgm
 Here is the error message:
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/Clssfd.asp, line 7

"Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb
--------------------------------------------------------------^




Quote:
quote:Originally posted by Imar
 It looks like you're not getting really detailed error info. To improve the quality of the error messages, turn off "Friendly Error Messages" (Hi, good afternoon, I'll be your error message for the day; how may I help you):

In Internet Explorer, open the Advanced tab of the Options dialog, and uncheck "Show friendly HTTP error messages". For your Web site in IIS, open the Properties dialog, switch to the Home Directory tab, and click the Configuration button. On the Debugging tab, make sure "Send detailed ASP error messages to the client" is checked.
Then run the page, and see if you get any error information.

Can you post the detailed error message you get here?

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 07:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right, forget the message I just sent you. Should have spotted this right away:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb

As you can seem the string with the database name is not closed properly. Change it to this:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=C:\Inetpub\wwwroot\artresales\fpdb\vsproduc ts.mdb"


Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 9th, 2004, 07:34 PM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh my god,
I found the problem here, I forgot to put the (") ending Quotation marks. I am so stupid, sorry to bother everybody...:)







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect to Access db thru VB.NET? am_kuthus Visual Studio 2008 1 June 3rd, 2008 04:48 AM
How to connect an Access DB remotely? frossie Access 1 June 14th, 2006 08:07 AM
Can connect to an remot Access DB? Ioan VB Databases Basics 1 May 9th, 2005 10:00 PM
Can connect to an remot Access DB Ioan Access VBA 4 March 24th, 2005 12:05 PM





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