Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 1st, 2007, 06:35 PM
John
Guest
 
Posts: n/a
Default error reasing database file

can somebody tell me what's wrong wth this code ?

IF Request.QueryString("YEAR") <"" THEN
SELECT * FROM tblMatches ORDER BY Year DESC,
END IF

I'm getting an error message: "Server error: Unable to retrieve schema
information from the query:"

I'm working on a Web site that reads a simple database file created in
Access.

The Web site has an asp page called results.asp and I used Frontpage to
design it. Part of the asp page is a table (comes standard with Frontpage)
and this table gets filled with the data from the database file based on a
custom query

There are 3 scenarios:

1. I need to display all the data from the database file and the URL and
custome query look like this:

http://localhost/data/result.asp

SELECT * FROM tblData ORDER BY Year DESC,

2. I need to display all the data that match certain year

http://localhost/data/result.asp?Year=2006

SELECT * FROM tblData WHERE (Year = ::Year::)
ORDER BY Year DESC


3. I need to display all the data that match certain name

http://localhost/data/result.asp?Name=Smith

SELECT * FROM tblData WHERE (Name = ::Name::)
ORDER BY Year DESC

My question is how do I combine all 3 above SQL statements into one.

TIA


  #2  
Old January 1st, 2007, 06:45 PM
Jon Paal
Guest
 
Posts: n/a
Default Re: error reasing database file

looks like you are unfamiliar with using ASP.
I recommend following some examples from this tutorial site.

http://msconline.maconstate.edu/tutorials/default.aspx


  #3  
Old January 1st, 2007, 06:45 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: error reasing database file

John wrote on 01 jan 2007 in microsoft.public.inetserver.asp.general:
Quote:
can somebody tell me what's wrong wth this code ?
>
IF Request.QueryString("YEAR") <"" THEN
SELECT * FROM tblMatches ORDER BY Year DESC,
END IF
IF Request.QueryString("YEAR") <"" THEN
sql =" SELECT * FROM tblMatches ORDER BY Year DESC"
END IF

You cannot mix sql ans vbscript at [pseudo]random

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles