Creating a temporary image of a recordset

Results 1 to 3 of 3

Thread: Creating a temporary image of a recordset

  1. #1
    Gary Broughton Guest

    Default Creating a temporary image of a recordset

    I have an Access 2000 table which contains results for football matches, and another which holds league positions i.e.<BR>MATCHES:<BR>HomeTeam, AwayTeam, HomeScore, AwayScore etc.<BR>LGTABLES: Postion,Team,Pld,HW,HD,HL,HF,HA,AW,AD,AL,AF,AA,GD, GS,GA,Pts<BR><BR>The lgtables table is updated via a form after results have been keyed in, and are quickly accessed on the web to give an up-to-date table i.e.<BR>P Team Pld W D L F A W D L F A Pts GD<BR>1 Burnley 6 2 1 0 5 1 2 1 0 4 1 14 +7<BR>2 Bolton 6 3 0 0 7 2 1 1 1 3 4 13 +4<BR>3 Blackburn 6 1 2 0 4 2 2 0 1 6 3 11 +5 etc.<BR><BR>What I want to do is show the league table positions at any date specified by the user, therefore creating a league table &#039on-the-fly&#039. I had it working by creating a different table in Access, but the problem is if several people use it at once, the data gets screwed up. I have tried cloning lgtables, and updating in real-time when a user goes onto the webpage, but it updates the real lgtables table anyway. I have also tried to copy all the fields into a multi-dimensional array, but then I find I cannot get them sorted in the correct order.<BR><BR>If anyone has any great suggestions, I will love you forever!<BR><BR>Cheers<BR>Gazza<BR>

  2. #2 Guest

    Default RE: Creating a temporary image of a recordset

    Just add a date field to the table and just insert the game results with the date and then you can just query via date :<BR><BR>select * from LGTABLES where MatchDate = #" & TargetDate & "#"<BR><BR>

  3. #3
    Gary Broughton Guest

    Default RE: Creating a temporary image of a recordset

    Thank you for your reply, it is much appreciated - but the way I read your suggestion is that you&#039re saying to have lgtable records for every day of the season. The problem with this is I have 113 seasons of data, with an average of 4 leagues per season, and around 20 teams in each league. This already takes up over 8,000 records. If I had one for each day of each season it would be astronomical.<BR><BR>The thing is I have written the code to update on the web page, and it is very quick considering its complexity. I end up with the correct array, but everything is sorted in the order it came out i.e. if Burnley were 1st in lgtables, they are still on the first line of the array, even if they were, say, 5th, at the designated date. My arrays appear like this:<BR>P Team P W D L Pts<BR>1 Burn 9 3 3 3 12<BR>2 Bolt 9 6 1 2 19<BR>3 Blac 9 4 3 2 15<BR>... and this is because the current lgtables may be like:<BR>P Team P W D L Pts<BR>1 Burn 20 9 7 4 34<BR>2 Bolt 20 9 2 9 29<BR>3 Blac 20 8 4 8 28<BR>The extra problem too, with the array sorting, is it needs to be sorted on various columns (i.e. Points, GoalDiff, GoalsScored, or Points, GoalsScored, GoalsConceded).<BR><BR>Cheers<BR>Gazza

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts