Solved

Good Advice

Posted on 2002-04-24
2
166 Views
Last Modified: 2010-05-02
I'm looking for some good advice from somebody that has used VB.NET with Oracle 8. Is using the disconnected data-set truely the way to go?? Or is there more overhead in connecting to the Database with each call to the database.
0
Comment
Question by:thenrich
2 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6966800
For a small number of clients you can keep your connection open,
But if you have large number of clients you need to open and close your connection.
Plus read this on connection pooling:
Pooling Connections
Applications often have different users performing the same type of database access. For example, in ASP.NET Web applications many users might be querying the same database to get the same data. In those cases, the performance of the application can be enhanced by having the application share, or "pool," connections to the data source. The overhead of having each user open and close a separate connection can otherwise have an adverse effect on application performance.
If you are using the OleDbConnection class, connection pooling is handled automatically by the provider, so you do not need to manage it yourself. If you are using the SqlConnection class, connection pooling is managed implicitly, but also provides options that allow you to manage pooling yourself. For more information, see Connection Pooling for the SQL Server .NET Data Provider.
0
 
LVL 6

Accepted Solution

by:
esolve earned 50 total points
ID: 6966810
Hi I am not a pro with .NET yet but could share some light on the subject...

A DataSet object is truly disconnected, meaning you would only have to go and connect once to get the data from the database and then again to update the changes in the dataset back to the datasource.

When connecting to an Oracle database make sure to use the OLEDBConnection and OLEDBCommand Classes.

Just remember that ADO.NET consist of Dataset classes and provider classes.
1. The Dataset classes are used to build a disconnected database structure in memory. They contain:
DataRelation, DataColumn, DataRow, DataTable classes in order to achieve this.
2. The provider Classes is XxxConnection eg. SQLConnection or OLEDBConnection and
XxxCommand eg. SQLCommand or OLEDBCommand

In your case you will also need the DataAdapter class to fill the Dataset. The DataAdapter class will also be used to update changes back to the database. This is achieved through calling any of its command classes nl. SELECT, INSERT, UPDATE, DELETE (DataAdapter Contains these 4 command classes by default)

There is probably more overhead in coding the Dataset, but that is it...

Good Luck

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now