Solved

Good Advice

Posted on 2002-04-24
2
168 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

810 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