Im trying to make business objects like .net with save/load built in. I have a context class that holds a reference to SQL in process globals. My object classes have initializers with context as a parameter so i can always easily access its sql object reference.
My problem is after initializing sql, creating its table, inserting default records, the next line gets all those objects with a select * from table. However it tells me connection 0 is closed. I never closed it though... and there is no sql.open() so im not sure what went wrong exactly. I want to just keep it open until it gets destroyed or paused. Then reconnect and re-read values on load.
Sent from my LG-MS840 using Tapatalk 2
My problem is after initializing sql, creating its table, inserting default records, the next line gets all those objects with a select * from table. However it tells me connection 0 is closed. I never closed it though... and there is no sql.open() so im not sure what went wrong exactly. I want to just keep it open until it gets destroyed or paused. Then reconnect and re-read values on load.
Sent from my LG-MS840 using Tapatalk 2
Last edited: