Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | 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
  #21 (permalink)  
Old August 9th, 2004, 09:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

%>
<table BORDER="0" width="100%" cellpadding="3">
...
...
</table>
<%
All that in red are HTML code. This cannot be used within ASP tags. So add an ASP closing tag before this line and add an ASP open tag after closing the table tag.

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #22 (permalink)  
Old August 9th, 2004, 09:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I believe you can delete those posts that you feel you have posted unknowingly.

Like the one that starts with "There is something wrong" which has got nothing to do with it, as the error is in your next post. Still when you post on ERRORs you face, you can post just the ERROR message along with some part of code just above and below the line that causes the error, but not the entire code(Only when asked to post if necessary) that was downloaded from somewhere which would be huge with all inline comments, that one would not require as it is of no use for debugging the error.
_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #23 (permalink)  
Old August 9th, 2004, 09:56 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

Ok I deleted some. Do you want me to delete more?

Reply With Quote
  #24 (permalink)  
Old August 9th, 2004, 10:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

That was just my suggestion.

BTW... Do you still face that error on line 307?

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #25 (permalink)  
Old August 9th, 2004, 10:14 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

That seemed to be a problem with %> and then inserting the table.
Now I get this:

 
Quote:
quote:Microsoft VBScript compilation error '800a0400'
Quote:

Expected statement

/bible5.asp, line 51

end select
^
and here are the first 70 lines:

Code:
<%
Option Explicit

'************************************************************************************
'* Declaration section
'************************************************************************************
' Mode contstants
Const MODE_DEFAULT     = 1
Const MODE_RESULTS     = 2

Const DB_NAME        = "kjv.mdb"    ' Name of our database file
Const SCRIPT_NAME    = "bible5.asp"    ' Name of this script

Const RECORDS_PER_PAGE     = 20            ' Number of records per page

Dim nMode    ' Current Mode
'************************************************************************************
'* End of Declaration section
'************************************************************************************

'************************************************************************************
'* Main section
'************************************************************************************

' Find out what mode we are in
nMode = CLng(Request.QueryString("Mode"))

' Depending on our mode we will do different things
Select Case nMode

    Case MODE_RESULTS
        ' This is where all the results will show        
        ShowResults

    Case Else     ' This one is for MODE_DEFAULT or invalid modes all the same
        ' By default display the search form
        ShowSearchForm    
End Select

'************************************************************************************
'* End of Main section
'************************************************************************************

'*************************************************  ***********************************
'* Functions section
'*************************************************  ***********************************

' This function will generate our connection string
' it assumes that Access database is in the same folder as this script

end select
response.end

Private Function GetConnectionString()
    GetConnectionString =     "Driver={Microsoft Access Driver (*.mdb)};" & _
                "DBQ=" & Server.MapPath(DB_NAME) & ";" & _
                "UID=;PWD=;"
End Function
Reply With Quote
  #26 (permalink)  
Old August 9th, 2004, 10:27 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

end select
response.end

Why do you have to use these two lines there? What is that for? I believe, you can comment that out or remove from there.

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #27 (permalink)  
Old August 10th, 2004, 12:02 AM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

ok so I removed it and now I get:

Code:
Microsoft VBScript compilation error '800a0400' 

Expected statement 

/bible5.asp, line 349 

</table>
^
Reply With Quote
  #28 (permalink)  
Old August 10th, 2004, 12:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post the code between lines 40 and 60?

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #29 (permalink)  
Old August 10th, 2004, 09:13 AM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
    Case Else     ' This one is for MODE_DEFAULT or invalid modes all the same
        ' By default display the search form
        ShowSearchForm    
End Select

'************************************************************************************
'* End of Main section
'************************************************************************************

'**************************************************************************************
'* Functions section
'**************************************************************************************

' This function will generate our connection string
' it assumes that Access database is in the same folder as this script
Here it is.

Reply With Quote
  #30 (permalink)  
Old August 11th, 2004, 12:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry, it was my bad, I had referred the line number in your previous to previous post. Didnot notice the lastest one showing up at line 349. Can you post the part of code around that?

Looks like you are missing some quotes some where.

Cheers!

_________________________
- Vijay G
Strive for Perfection
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
Select all checkboxes in a datagrid kawal.singh C# 2 May 7th, 2007 02:09 PM
Select from Two Tables Problem gaurav_jain2403 SQL Server 2000 2 May 18th, 2006 07:18 AM
Select lot tables... vieritlc Classic ASP Databases 3 May 18th, 2004 07:07 AM



All times are GMT -4. The time now is 08:20 AM.


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