I am writing a client using OLE DB and VC++ and it will access an SQL database. The database has 6-8 tables in it, some stored procedures, views, etc.
Is it best for the client to open all the tables when the app starts and then close them at the end, or should the app be written so that the table is only opened when it needs data, and then closed immediately after it is finished displaying, updating, or deleting.
There will be multiple users on the database all connecting using the same client app.
One of the tables is a list of transactions (it's a business accounting package) where I want to give the users the ability to MoveNext, MovePrev through the record set. It would seem that this table should always be open.
Could someone comment on different approaches here.
Thanks,
Is it best for the client to open all the tables when the app starts and then close them at the end, or should the app be written so that the table is only opened when it needs data, and then closed immediately after it is finished displaying, updating, or deleting.
There will be multiple users on the database all connecting using the same client app.
One of the tables is a list of transactions (it's a business accounting package) where I want to give the users the ability to MoveNext, MovePrev through the record set. It would seem that this table should always be open.
Could someone comment on different approaches here.
Thanks,