N
.Net Sports
I am resurrecting an old script from a previous programmer, and want to
migrate it over to asp.net from classic asp. Tho there are other
peripheral parts of the script (that really have no bearing on the
core, in which I will explain), the main core is the concern. I have a
daily feed from a horseracing prognosticator that gets put into an sql
database on a daily basis for roughly 15 popular racetracks. A user
(who will need a usern/password) will come to a page that lists the
tracks available for that day, click on a link for a track, and will
come to the page and script in question. From the database will be data
from 3 different tables: tblRace (the # of race for that day, the
racedate the trackID, other auxiliary info like track length, horse
ages for a race, ), tblTrack (trackname, trackID) , tblHorseentry (the
horses name, the gate position, speed rating, other aux info) .
tblHorseentry has a raceid, relational key with tblRace, and a trackid
is in relation with tblhorseentry and tbltrack. Below is the SQL
statement:
'''sql stmt'''
<% sqlstr ="SELECT
tblhorseentry.horsename,tblhorseentry.gatepos,tblhorseentry.bestbet,tblhorseentry.topplay,tblhorseentry.rating,tblhorseentry.speedpr,tblrace.raceid,tblrace.racedate,tblrace.raceno,tblrace.racelength,tblrace.raceturf,tblrace.racedescription,tblrace.horseage,tbltrack.trackname
FROM tblrace INNER JOIN tblhorseentry ON tblhorseentry.raceid =
tblrace.raceid INNER JOIN tbltrack ON tblrace.trackid =
tbltrack.trackid WHERE trackname = '" &
request.querystring("trackname") & "' and racedate = '" &
request.querystring("racedate") & "' AND raceno = 1 AND rating = 1;" %>
The problem here is at the end, where along with the querystrings
bringing over the trackname and racedate, this sqlstring will bring up
just the horsesname and auxiliary info for just the first race, and if
he is the favored horse (rating) for this particular race by
information compiled by the horseracing handicapper. I need to find a
way to grab all the racenumbers (raceno) and ratings in an array and
somehow loop thru the array until the end of the recordset (asp) or
dataset (asp.net).
With those obstacle in mind, how can I start to set this up in asp.net.
Will a DataList that just templates everything out, or a Repeater
control be best, or will even a DataGrid control encompass everything I
need to accomplish?
Thanks for any input
E.M.
..Net Sports
migrate it over to asp.net from classic asp. Tho there are other
peripheral parts of the script (that really have no bearing on the
core, in which I will explain), the main core is the concern. I have a
daily feed from a horseracing prognosticator that gets put into an sql
database on a daily basis for roughly 15 popular racetracks. A user
(who will need a usern/password) will come to a page that lists the
tracks available for that day, click on a link for a track, and will
come to the page and script in question. From the database will be data
from 3 different tables: tblRace (the # of race for that day, the
racedate the trackID, other auxiliary info like track length, horse
ages for a race, ), tblTrack (trackname, trackID) , tblHorseentry (the
horses name, the gate position, speed rating, other aux info) .
tblHorseentry has a raceid, relational key with tblRace, and a trackid
is in relation with tblhorseentry and tbltrack. Below is the SQL
statement:
'''sql stmt'''
<% sqlstr ="SELECT
tblhorseentry.horsename,tblhorseentry.gatepos,tblhorseentry.bestbet,tblhorseentry.topplay,tblhorseentry.rating,tblhorseentry.speedpr,tblrace.raceid,tblrace.racedate,tblrace.raceno,tblrace.racelength,tblrace.raceturf,tblrace.racedescription,tblrace.horseage,tbltrack.trackname
FROM tblrace INNER JOIN tblhorseentry ON tblhorseentry.raceid =
tblrace.raceid INNER JOIN tbltrack ON tblrace.trackid =
tbltrack.trackid WHERE trackname = '" &
request.querystring("trackname") & "' and racedate = '" &
request.querystring("racedate") & "' AND raceno = 1 AND rating = 1;" %>
The problem here is at the end, where along with the querystrings
bringing over the trackname and racedate, this sqlstring will bring up
just the horsesname and auxiliary info for just the first race, and if
he is the favored horse (rating) for this particular race by
information compiled by the horseracing handicapper. I need to find a
way to grab all the racenumbers (raceno) and ratings in an array and
somehow loop thru the array until the end of the recordset (asp) or
dataset (asp.net).
With those obstacle in mind, how can I start to set this up in asp.net.
Will a DataList that just templates everything out, or a Repeater
control be best, or will even a DataGrid control encompass everything I
need to accomplish?
Thanks for any input
E.M.
..Net Sports