View Full Version : Database
Gambler
17th June 2004, 10:28.56 PM
Im using windows Xp and access 2000.
Ive exported 30 days of races from MNR and their results into Access. Im now done with those 30 days of races.
Here is what I want to do.
1. Store those races somewhere, so i can delete them out of access.
2. Download more MNR races and export them into access.
3. When Im done with them I would like to store them with the above races and then delete them from access.
4. At some point I would like to recall all those races I deleted back into access so I can now test 100 races instesd of 30.
5. I beleive its called building a database.
How do I do this?
Thanks ed
Rick
17th June 2004, 10:46.56 PM
No. That is called making work.
There may be a need for two tables. One for races without results and one for races with results.
You put all your races with results in one table. There is no need to delete them.
You use the queries to select which set of races you want to look at.
If you just want to look at MNR and have all races in your table. You just put MNR in the criteria line of tTRK in your query. If you only want to look at a limited period you and use several different ways of selecting them. One way is putting
Between #01/01/2004# and #02/01/2004#
on the criteria line of tDATE in your query. The pound signs are required when working with dates.
Use the queries to do your selection for you, not deleting and adding records.
Just makes it so much easier.
Gambler
18th June 2004, 11:00.48 AM
Need more help.
1. I let all my files in access race, results, and charts.
2. Let all those files in HTR.
3. Downloaded the results for a race in access that I didnt have the results for earlier.
I went into HTR and exported all the files over to access. Now I have double files in access.
Question is how do I
1. Export results or new racefiles into access without causing duplication.
Rick
18th June 2004, 01:29.09 PM
There are several things you need to take into consideration.
I always say that you should set up using HTR2 and/or Access around how you use it. To me that also means setting up the racefiles into directories for the way you want to use HTR2. Maybe you need to set up directories by track or by area. I just break mine down by month, but I am not a big user of the tester in HTR2.
If you downloaded the ALL_HX4.mdb template each table should already have the Primary Key set. You can check your table by opening it in the design mode. The fields for DATE, TRACK, RACE & PROGRAM # should have a little KEY icon beside the field name. If you have the Primary Key set to those four fields you should not have any duplicate records in your table.
You should never mix races with results with races without results in your table. If you want to look at the races in Access before the races are run you need a separate table for races without results. It is very easy to create a new blank table; just right click on the table name and select copy, in the white space just to the right of the file name right click and select paste. A option box will pop up asking for you to name the table and giving you the option of selecting how you want to paste it. Select Structure Only.
This gives you a new table without any data in it. You can make this your DAILY or WORKING table where you import races without results. When you are done you just delete all the records in this table.
If you find your Primary Key was not set, you can use this option to make a blank table, then use this option the 2nd time to append the records from your old table to the new table after you have set the Primary Key in your new table.
You could create a directory like:
C:\htr\daily\
Or
C:\htr\working\
To download to every day. That could be your directory for races without results. You might even need more than one directory since sometimes you can’t get all the results right away. Maybe you should name them like
C:\htr\Monday\
Etc
When you have all the results you could export everything in HTR2 and import it into Access. Or you could have another working folder to collect the daily races into after you have the results as a holding tank until you are ready to export them.
I do mine once a month. And I keep all tracks for the month in one folder.
You have to set up a system for yourself that works for you.
MikeDee
18th June 2004, 02:55.25 PM
Back in the days when I was keeping a data base, I kept multiple tables in it. My main table was named race day. Tihis was a table built on the all_hx4 template. All of my queries and reports used this table in their design. This was my work bench.
I kept all of my data that had results in a second table I called master. You could have multiple master tables maybe one for each track you are following.
Each day I would bring in the race data for the day into my race day table, without results, and run my spot plays that I would bet from.
At the end of the day I just delete the contents of this table and it was ready for the next day.
Once a week I would bring in the past weeks data that had results, and charts. Then I would move this data from the race day table to the master table.
Whenever I wanted to do some anaysis I would just copy the data I wanted from my master table into my race day table. This is like taking something out of the file cabinet and putting on your desk to work with.
Once I was done I could just delete the data in the race day table since it is still in the master table.
The benefits of this tpe arrangement is that you keep your master records with results seprate from the data you use on a daily basis for beting, but you only need one set of spot plays pointing to a single table.
Always make sure that in any table you use that the fields tTRK, tdte, nRace, and tPrg are set as primary key fields. This will prevent any duplicate data from getting into your table.
willwin
18th June 2004, 08:29.41 PM
Helps me a lot. Great explanations - thanks Ricks and MikeDee!
MikeDee
19th June 2004, 06:42.57 AM
Thanks Will
Ricks words on how to manage the htr files with different directores are right on. You need to set up a filing system, that matches what you are tryng to do with access and a routine for updating your data that works for you.
For me Mondays are file management day. I put my htr files in folders for each day of the week and on Monday I get the results and charts and put the weeks data in a monthly folder.
I store all of my files ( the b files with the results added and the charts), unzipped.
I store my data by track by year. At the end of the month I move the files from the monthly folder to the current year track folder.
At the end of the year I take all of the years files for each track and zip them into a single file for that track and year.
It sounds like more work then it really is and doing it a little at a time makes it more bearable. Moving the files around your PC is pretty boring stuff and I find that if you break it up and do a little at a time. It does not seem to be as bad.
I don't try to keep a big Db anymore. It just got to be to unwieldly for my PC to crunch all those numbers. Now a days when I want to study something I just go and get the tracks I want and the timeframes I want an build a Db for the study. When done I delete the access tables and go play golf!!!
Gambler
20th June 2004, 10:13.05 PM
I have two tables All_HX4 and ALL-HX5. I made copies of them and called them ALL_HXR-RESULTS AND ALL_HX5_RESULTS. I can import the races into ALL_HX4 ok but when I try and import them into ALL_HX4_RESULTS they dont go in there. What am I doing wrong?
Thanks ed
Gambler
20th June 2004, 10:22.54 PM
I set my primary keys in table ALL_HX4. Then when I import my files I choose No Primary key. When Im done exporting I look in my tables design view and the primary keys I selected are no longer there. How do I make them permenant?
Rick
20th June 2004, 10:41.04 PM
Sounds like you are not selecting the option to import into an existing table.
Off hand I think you would be better off making a copy of your database instead of making copies of your tables.
Have one database for results and one database for your races without results.
That way all your queries will work for both.
Also your import macros will/can work for both.
You will have to set up a plan for handeling your files so that you are exporting races without results to one and exporting the races with results to the other.
You might be wll off to write out a plan of how to do all that. It doesn't do you much good if your start importing races without resutls into your table/database for races with results.
You would probably be better off have separate directories for handeling the races.
You could have a daily/working directory to download the races to so you can export them to your table/database without results.
At the end of the day/the next morning/whenever, you could move the races to a directory where you can add the results and charts and export the races to your table/database for races with results.
That opens up your daily/working directory so you can download the next set of races.
Figure out what you want to do, then plan how you need to do it, and follow your plan.
You may have to change the paths in the macros to point to your new directories.
Gambler
21st June 2004, 11:08.55 AM
I decided to use two databases. The original is called Copy of Data and its copy is called Db2.
I want to change their names to Results and No Results. When I go into window explorer and try to name the I get a message that tells me my If I change the file extension the file will become unusable> What shouls I do?
Thanks for all the help.
Ed
Donnie
21st June 2004, 12:34.29 PM
Ed-
Be sure to name them Db2.mdb and Copy of Data.mdb...don't leave off that extension!
Gambler
21st June 2004, 12:46.10 PM
Once again--Thanks Donnie
Rick
21st June 2004, 01:14.15 PM
Microsoft defaults to not showing the extension of files it thinks it know what they belong to.
In my opinion; VERY STUPID
My suggestion to everyone that has this problem is to open Windows Explorer, click on Tools, Folder Options, and View.
Remove the check mark from "Hide extensions for known file types".
Click OK.
Its amazing what you can see now.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.