Solved

Good Advice

Posted on 2002-04-24
2
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 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