|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Quesion about ADO.NET in VB.NETI have a number of function to get some data in database,
What is the better design for the task? There should be three function to get differnece data in difference tables, They may need to be call seperately, and so I prefer they have their own function. However, In my program, The startup process must run this function once to set up the UI. So I prefer there may be another function to get all the there recordset to a datatable. And finally, combine and return a dataset. Actually, the bottle neck is on connection, and so, I would like to use as few as possible of connection. Thank you. Cylix,
Which VB version are you using because for this the answers for version 2002/3 and 2005 can be different? However keep in mind that with Adonet the best method is to open and close connections as often as that is possible. (And because it is disconnected instead of the connected ADO is that possible). I hope this helps sofar. Cor Show quoteHide quote "Cylix" <cylix2***@gmail.com> schreef in bericht news:1155291884.453616.151620@m73g2000cwd.googlegroups.com... >I have a number of function to get some data in database, > What is the better design for the task? > > There should be three function to get differnece data in difference > tables, > They may need to be call seperately, and so I prefer they have their > own function. > > However, In my program, The startup process must run this function once > to set up the UI. > So I prefer there may be another function to get all the there > recordset to a datatable. > And finally, combine and return a dataset. > > Actually, the bottle neck is on connection, and so, I would like to use > as few as possible of connection. > > Thank you. > > Which VB version are you using because for this the answers for version I am using VS2003.> 2002/3 and 2005 can be different? > However keep in mind that with Adonet the best method is to open and close But the bottle neck is on database connection, so i would like to take> connections as often as that is possible. (And because it is disconnected > instead of the connected ADO is that possible). three tables once in the startup connection and close it then. Cylix,
With version VS2003 you can add a Component to your project. That will open a layer on which you can drag 3 times a dataadapter and than use every time the same dataset. That component becomes your DataLayer Class To optimize slightly the normal behaviour you can than use that as Connect.open da1.Fill(ds) da2.fill(ds) da3.fill(ds) conn.close Be aware always to close the connection corresponding the open. These newsgroups are filled in past by people who did not and got connection problems. I hope this helps, Cor Show quoteHide quote "Cylix" <cylix2***@gmail.com> schreef in bericht news:1155517501.193293.292950@m73g2000cwd.googlegroups.com... >> Which VB version are you using because for this the answers for version >> 2002/3 and 2005 can be different? > I am using VS2003. > >> However keep in mind that with Adonet the best method is to open and >> close >> connections as often as that is possible. (And because it is disconnected >> instead of the connected ADO is that possible). > But the bottle neck is on database connection, so i would like to take > three tables once in the startup connection and close it then. >
Can a .NET Web Service be accessed from a VB6 Client?
Is there a statement that will completely empty a listbox? Event handlers Threading Question How to code image path relative to project Reporting options in vb 2005 Tip of The Day Application Priority Debug Windows Services is My.Settings version specific? |
|||||||||||||||||||||||