Date Range lookup between tables in asp 2.0

Date Range lookup between tables in asp 2.0

am 18.09.2006 15:36:02 von NickCR04

Hi all,

I am (using ASP.net 2.0 in Visual Web developer 2005 Express Edit) trying to
set up an asp front end to a music DB which has 2 main tables:

1) MUSIC - containing music release information (eg label, artist, name,
date reviewed)
2) ISSUES - containing 3 columns - 1) a list of issue numbers and 2) issue
start date and 3) Issue end date columns

I am (a very novice programmer) having difficulty with presenting search
data in a gridview after a user enters the "date reviewed" details in a text
box and hits a button to perform the search.

user enters date and i am trying to get it to lookup the list of dates in
the second table and return the issue number

i create the textbox and button and then create a gridview connecting back
to the db and am getting stuck from here.

I have tried "ADD WHERE" with various SQL Queries/criteria and thought it
could be done in a "RangeValidator" but have had no joy as the upper and
lower ranges are dependent on what is entered in the textbox and must be
looked up from a separate table. can thios be done in RangeValidator?

one string i tried (which returns everything not just the week in Q) is as
follows:

select NEWMUSIC.MusicID, NEWMUSIC.MusicReleaseDate, NEWMUSIC.MusicTitle,
NEWMUSIC.MusicArtist, NEWMUSIC.MusicLabel, NEWMUSIC.MusicReviewedDate,
ISSUEDATES.Issue#
from NEWMUSIC INNER JOIN ISSUEDATES ON NEWMUSIC.MusicReleaseDate Between
ISSUEDATES.ISSUE_START_DATE and ISSUEDATES.ISSUE_END_DATE

I am really struggling here so would appreciate any assistance!

thanks in advance

Nick

Re: Date Range lookup between tables in asp 2.0

am 18.09.2006 16:27:26 von reb01501

NickCR_04 wrote:
> Hi all,
>
> I am (using ASP.net 2.0 in Visual Web developer 2005 Express Edit)

There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice), but this is a classic asp newsgroup. ASP.Net is
a different technology from classic ASP. While you may be lucky enough
to find a dotnet-savvy person here who can answer your question, you
can eliminate the luck factor by posting your question to a newsgroup
where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
There are also forums at www.asp.net where you can find a lot of people
to help you.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Date Range lookup between tables in asp 2.0

am 18.09.2006 19:13:01 von NickCR04

thanks Bob for the heads up will repost