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 August 9th, 2004, 09:19 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old August 9th, 2004, 09:21 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old August 9th, 2004, 09:56 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

 
Old August 9th, 2004, 10:02 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old August 9th, 2004, 10:14 PM
Friend of Wrox
 
Join Date: Jul 2004
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
 
Old August 9th, 2004, 10:27 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old August 10th, 2004, 12:02 AM
Friend of Wrox
 
Join Date: Jul 2004
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>
^
 
Old August 10th, 2004, 12:21 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old August 10th, 2004, 09:13 AM
Friend of Wrox
 
Join Date: Jul 2004
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.

 
Old August 11th, 2004, 12:31 AM
Friend of Wrox
 
Join Date: Jun 2003
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





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





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