Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2004, 05:02 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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.
Reply With Quote
  #2 (permalink)  
Old March 9th, 2004, 05:06 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #3 (permalink)  
Old March 9th, 2004, 05:26 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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...)

Reply With Quote
  #4 (permalink)  
Old March 9th, 2004, 05:30 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #5 (permalink)  
Old March 9th, 2004, 06:58 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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.
Reply With Quote
  #6 (permalink)  
Old March 9th, 2004, 07:00 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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.
Reply With Quote
  #7 (permalink)  
Old March 9th, 2004, 07:02 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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.
Reply With Quote
  #8 (permalink)  
Old March 9th, 2004, 07:03 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #9 (permalink)  
Old March 9th, 2004, 07:34 PM
Registered User
 
Join Date: Mar 2004
Location: Colorado Springs, Colorado, USA.
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...:)


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.