PDA

Click to See Complete Forum and Search --> : Connect once or every time


Tom Yasnowski
Sep 24th, 2002, 09:00 AM
I have some code where I open the connection at the begining
of the app, and run sql statements or "commands" seperatly at various points in the app. However I have some sample code that bundles the two together, o_adapter = New OleDbDataAdapter(s_command, o_connection) which I think means I am going to
re-establish a connection every time I issue a command. Is this
not inefficient if you are going to execute commands frequently?
Just want to decide which way to go. BTW db is Oracle.

Thanks
Tom

cim3
Sep 24th, 2002, 09:07 AM
I was always told to connect everytime over a network and if there may be a time gap of any length between commands i.e requires some kind of user action instead of pure code running.