473,378 Members | 1,699 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,378 software developers and data experts.

HELP DataRelation or SQL join ????

Dear all,

I have an access database which is access by an application.
From a remote PC using vb.net I am able to access to this database and
collect necessary data. I need to make the remote connection and data
collection as fast as possible in order to avoid potential locking situation.

The data I am interesting in are located in 3 different tables.

My question is :

Is it better to connect to the database and collect each table data in
separate .NET dataset ( the db connection will be close) and make necessary
datarelation in my VB.NET application ?

or

Is better to connect to the database and run an JOIN SQL statement and
collect all my necessary data in one uinque dataset with all needed
information ?

Please not that this remote database could have more than 4000 records in
tables.
In other words I need to get the connection to the database as short as
possible

thnaks for your comment
regards
serge

Jul 21 '05 #1
1 1658
In message <CB**********************************@microsoft.co m>, serge
calderara <se************@discussions.microsoft.com> writes

The data I am interesting in are located in 3 different tables.

My question is :

Is it better to connect to the database and collect each table data in
separate .NET dataset ( the db connection will be close) and make necessary
datarelation in my VB.NET application ?

or

Is better to connect to the database and run an JOIN SQL statement and
collect all my necessary data in one uinque dataset with all needed
information ?


The general rule of thumb would be to use the SQL JOIN method and
therefore the power of the database engine to retrieve the required
records. By doing the job properly and only specifying the required
fields from each table you will always get the data faster
(specifically, you are transferring less data - think about for a
while).

There are not really that many scenarios where you would take your first
idea (ie: you really would be updating the contents of all records in
each table, and then you need to reconnect to send it back).

--
Andrew D. Newbould E-Mail: ne********@NOSPAMzadsoft.com

ZAD Software Systems Web : www.zadsoft.com
Jul 21 '05 #2

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

Similar topics

4
by: Ben R. | last post by:
This is taken from MSDN Documentation: It is important to understand the difference between a true join and the function of a DataRelation object. In a true join, records are taken from parent...
3
by: serge calderara | last post by:
Dear all, I have a dataset which contains 2 DataTable The idea is to bind a text box control with one table field and then diaplaye the associated content of the second table based on the first...
1
by: yaser | last post by:
Hello: I need save my update but i can't :confused: :confused: :confused: look my code : Imports System.Data Imports System.Data.OleDb Public Class Form1
3
by: Steve Bishop | last post by:
I am use to working with only single tables with my command object. Now I have 2 tables that need a 1 to 1 relationship. Is it possible to inner join 2 tables in my SQL statement before thowing the...
1
by: serge calderara | last post by:
Dear all, I have an access database which is access by an application. From a remote PC using vb.net I am able to access to this database and collect necessary data. I need to make the remote...
7
by: Rich | last post by:
Hello, I am pulling master data from one master table and detail data from two detail tables. The rows from the master data are displayed in textboxes on my form which are bound to the data...
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
0
by: Bob | last post by:
On the edge of being off topic I guess but it is a C# problem. Dataset has three tables parent, child, grandson. Based on SQL Server 7 Database Parent joins child on an int column and is no...
0
by: KA NMC | last post by:
I have One Datagrid with a dataset that calls two tables - the First table is the table the user will be editing - which edited on the grid or in a textbox - as the user edits the grid - that info is...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.