PureSim Database/Queries (Full Version)

All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball



Message


Nukester -> PureSim Database/Queries (7/25/2009 6:10:20 PM)

Ive made some modifications to the 5 main tables (master,batting,pitching,fielding,fieldof) in LahmanPS.mdb but Im having an issue with the game recreating the PS tables. After I delete the PS tables and start the game back up, the game will reprocess the DB and create the PS tables. However, for some reason I only get one record in those tables.

I see that the PureSimBatters and PureSimPitchers queries only select the "Top 1" so Im not sure if thats the issue here. When I run the queries in the default Lahman DB, I get full tables for the PS created tables, yet using those same exact queries in my modified DB, I only get that one record in each PS created table.

Any ideas why I cant get the full tables using the same exact queries?




Nukester -> RE: PureSim Database/Queries (7/25/2009 6:24:49 PM)

Ok, I took a fresh copy of the LahmanPS DB and pasted in my modified Master table and the query ran well. I then copied over my modified Batting table, and the query only created one record, even though the structure of the original and my modifed tables seem to be the same. The only thing I see different is that the original Batting table has a grey key next to PlayerId, YearID, and Stint. How do I get those keys on my modifed Batting table (Im guessing they are foriegn keys but Im not sure how to set them up) ?




Wrathchild -> RE: PureSim Database/Queries (7/26/2009 6:34:39 PM)

I think in Access the gray key indicated a primary field. You would go into the table properties and edit that field to be a primary field. I don't know if that would make a major difference, though.




Nukester -> RE: PureSim Database/Queries (7/26/2009 7:01:56 PM)

I figured out to make more than one primary key (a multi-field key) you just hold down ctrl and choose the fields and make them primary keys. Still didnt make a difference though. I still only got one record from the query




puresimmer -> RE: PureSim Database/Queries (7/26/2009 7:02:23 PM)


quote:

ORIGINAL: Nukester

Ive made some modifications to the 5 main tables (master,batting,pitching,fielding,fieldof) in LahmanPS.mdb but Im having an issue with the game recreating the PS tables. After I delete the PS tables and start the game back up, the game will reprocess the DB and create the PS tables. However, for some reason I only get one record in those tables.

I see that the PureSimBatters and PureSimPitchers queries only select the "Top 1" so Im not sure if thats the issue here. When I run the queries in the default Lahman DB, I get full tables for the PS created tables, yet using those same exact queries in my modified DB, I only get that one record in each PS created table.

Any ideas why I cant get the full tables using the same exact queries?


Assuming your Lahman datbase is a fresh copy from lahman that you modified, just save the current lahmanps.mdb and copy yours there being sure to name yours "lahmanps.mdb"

Then run PureSim. Puresim will detect that your database lacks all it's required analytical tables and it will add them all. At that point you should be good to go.

Make sense?




Nukester -> RE: PureSim Database/Queries (7/26/2009 7:09:05 PM)

Thanks Shaun. What I did was take a modified version of the Lahman .CSV files, confirmed the formats where the same as the in-game LahmanPS.mdb database tables (adding in any missing fields like "G_Old"), imported those files into an Access database (master, batting, pitching, fielding, and fieldingOF), then copied those tables into the LahmanPS.mdb files, overwritting the existing files. Then I deleted the tbPureSimBatters, tbPureSimPitchers, and tbPureSimVersion tables. Then I started the game and it processed the new database, but when creating a historical league in-game, it generated all fictional players. I went back into the Lahmanps.mdb database and ran the queries for PureSimBatters and PureSimPitchers, but the query only creates one record.

Everything works when I copy only my modified master table over. Its when I copy over the batters or pitchers tables that it doesnt work




puresimmer -> RE: PureSim Database/Queries (7/26/2009 7:21:37 PM)

I'd have to see a copy of your lahmanps.mdb with your custom tables imported.

If you send me a copy I'll have a look.




Nukester -> RE: PureSim Database/Queries (7/26/2009 7:32:14 PM)

Thanks again Shaun. I zipped up the .mdb file but its still 22 MB so Im not sure how to send it to you




puresimmer -> RE: PureSim Database/Queries (7/26/2009 7:37:21 PM)


quote:

ORIGINAL: Nukester

Thanks again Shaun. I zipped up the .mdb file but its still 22 MB so Im not sure how to send it to you


How about you zip up the CSVs then? That should be pretty small.




Nukester -> RE: PureSim Database/Queries (7/26/2009 7:47:50 PM)

I think I made some of the changes in Access, after importing the .CSV files. Like setting the primary keys, adding a couple of fields (g_batting and g_old I believe), deleting a few fields in the pitchers table, etc

I sent an email via the forums, but it didnt allow me to attach anything....sorry about that. How can I attach the zip file?




puresimmer -> RE: PureSim Database/Queries (7/26/2009 8:45:33 PM)

Try this:

http://www.suldogstudios.com/drop-box

I suggest using Internet Explorer.

Please let me know when you get it uploaded as I put the page up temporarily.

Shaun




Nukester -> RE: PureSim Database/Queries (7/26/2009 9:00:43 PM)

Ok I figured out part of the puzzle. The one player it was creating a record for had a negative "stint". I changed the stint to the correct number and now the queries run and I get a full table created when the game process the DB. However, when the game tries to import the players upon league creation, I get an error message saying "Runtime Error 3265 - Item not found in this collection"

I uploaded a zip file containing the .mdb that gave me the above error (21.7MB)




Nukester -> RE: PureSim Database/Queries (7/27/2009 12:34:32 AM)

Ok I took a step back, went out to dinner, and came back and went thorugh this again and got it working. The intial issue was the one player with a negative stint. Once I fixed that, I forgot to make the adds/deletes of fields in the database that needed changing (a few different fields in batting, pitching and fielding). I made those changes and everything imported well. Thanks for helping me out Shaun




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.6875