Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

PureSim Database/Queries

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball >> PureSim Database/Queries Page: [1]
Login
Message << Older Topic   Newer Topic >>
PureSim Database/Queries - 7/25/2009 6:10:20 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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?
Post #: 1
RE: PureSim Database/Queries - 7/25/2009 6:24:49 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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) ?

(in reply to Nukester)
Post #: 2
RE: PureSim Database/Queries - 7/26/2009 6:34:39 PM   
Wrathchild


Posts: 817
Joined: 10/12/2007
From: Reading, PA
Status: offline
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.

_____________________________

J.G. Wrathchild, Manager, St. Louis Cardinals (1900-1906), Brooklyn Superbas (1907, 1908)

(in reply to Nukester)
Post #: 3
RE: PureSim Database/Queries - 7/26/2009 7:01:56 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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

(in reply to Wrathchild)
Post #: 4
RE: PureSim Database/Queries - 7/26/2009 7:02:23 PM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline

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?


_____________________________

Developer, PureSim Baseball

(in reply to Nukester)
Post #: 5
RE: PureSim Database/Queries - 7/26/2009 7:09:05 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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

(in reply to puresimmer)
Post #: 6
RE: PureSim Database/Queries - 7/26/2009 7:21:37 PM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline
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.

_____________________________

Developer, PureSim Baseball

(in reply to Nukester)
Post #: 7
RE: PureSim Database/Queries - 7/26/2009 7:32:14 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
Thanks again Shaun. I zipped up the .mdb file but its still 22 MB so Im not sure how to send it to you

(in reply to puresimmer)
Post #: 8
RE: PureSim Database/Queries - 7/26/2009 7:37:21 PM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline

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.

_____________________________

Developer, PureSim Baseball

(in reply to Nukester)
Post #: 9
RE: PureSim Database/Queries - 7/26/2009 7:47:50 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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?

(in reply to puresimmer)
Post #: 10
RE: PureSim Database/Queries - 7/26/2009 8:45:33 PM   
puresimmer

 

Posts: 2299
Joined: 7/24/2005
Status: offline
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

_____________________________

Developer, PureSim Baseball

(in reply to Nukester)
Post #: 11
RE: PureSim Database/Queries - 7/26/2009 9:00:43 PM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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)

(in reply to puresimmer)
Post #: 12
RE: PureSim Database/Queries - 7/27/2009 12:34:32 AM   
Nukester


Posts: 472
Joined: 7/3/2006
From: Newburgh, NY
Status: offline
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

(in reply to Nukester)
Post #: 13
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [Sports] >> PureSim Baseball >> PureSim Database/Queries Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.686