473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Quesion about ADO.NET in VB.NET

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.

Aug 11 '06 #1
3 812
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

"Cylix" <cy*******@gmail.comschreef in bericht
news:11**********************@m73g2000cwd.googlegr oups.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.

Aug 11 '06 #2
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.

Aug 14 '06 #3
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

"Cylix" <cy*******@gmail.comschreef in bericht
news:11**********************@m73g2000cwd.googlegr oups.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.

Aug 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthew K Jensen | last post by:
I've been trying to find a way to detect when a command run by os.popen (or similar) has completed (in Windows, btw). I found such a function (i don't remember the exact name and library), but the...
17
by: laniik | last post by:
Hi. I have a simple question, but I couldnt find the answer in any literature online. i have a base class A, that has some functions. now, my understanding of virtual functions means that in:...
5
by: Koen | last post by:
Hi group, In a stylesheet I saw the next: #menu ul { width: 154px; \width: 156px; w\idth: 154px; }
1
by: ion | last post by:
My application is a 2 tier design (client and db server) however I split it up into 3 components: UI layer, business layer and data access layer. My question is regarding how the UI interacts...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.