473,402 Members | 2,072 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,402 software developers and data experts.

Visual Basic 2005.Net TableAdapters

When using the VS Wizards to create a DataSet I select tables. Then, I use
the TableAdapter Configuration Wizard to modify the underlying queries that
retreive the data. What I'm wonder is, does this TableAdapter work in the
same manner as a SQL Server Stored Procedure or View? Or, does it work like
MS Access where it pulls all the data over and then filters it?

Or, should I be making my data sources for the TableAdapters stored
procedures and Views instead?

Thank You,

Greg Setnes
Aug 31 '07 #1
7 2478

"Greg" <Ac**********@newsgroups.nospamwrote in message
news:98**********************************@microsof t.com...
When using the VS Wizards to create a DataSet I select tables. Then, I use
the TableAdapter Configuration Wizard to modify the underlying queries
that
retreive the data. What I'm wonder is, does this TableAdapter work in the
same manner as a SQL Server Stored Procedure or View? Or, does it work
like
MS Access where it pulls all the data over and then filters it?

Or, should I be making my data sources for the TableAdapters stored
procedures and Views instead?

Thank You,

Greg Setnes
"Work in the same manner" makes it tough to give a straight answer. But if I
understand you correctly - then No.

Basically ADO.Net by default doesn't have a "client-side cursor". It is
"disconnected". So everything, unless you do call an SP, is client-side
processing. It depends on how the apdaptor is configured if "all the data is
pulled over".

Does that help? Or did I missunderstand something?

-ralph
Sep 1 '07 #2
=?Utf-8?B?R3JlZw==?= <Ac**********@newsgroups.nospamwrote in
news:98**********************************@microsof t.com:
What I'm wonder is, does this TableAdapter work in the
same manner as a SQL Server Stored Procedure or View? Or, does it work
like MS Access where it pulls all the data over and then filters it?
It runs the query on the server, pulls the data down into a dataset.
Sep 1 '07 #3
Hi Greg,
What I'm wonder is, does this TableAdapter work in the same manner as a
SQL Server Stored Procedure or View?

No, TableAdapter doesn't work in the same manner as a SQL Server Stored
Procedure or View. In fact, they are different concept.

A stored procedure consists of several SQL statements and compiled on the
SQL Server. A view is based on a table and has some filter conditions. Both
of them reside in database.

TableAdapters provide communication between your application and a
database. More specifically, a TableAdapter connects to a database,
executes queries or stored procedures, and either returns a new data table
populated with the returned data or fills an existing DataTable with the
returned data. TableAdapters are also used to send updated data from your
application back to the database.
does it work like MS Access where it pulls all the data over and then
filters it?

No, TableAdapter pulls the data and fill the returned data into a
DataTable. It doesn't filter the data. If you'd like to filter the data in
a DataTable, you could use a BindingSource or DataView to do it. The
following is a sample:

Dim table As New DataTable
Dim view As New DataView(table)
view.RowFilter = "ID1"

-or-

Dim bs As New BindingSource(table, "")
bs.Filter = "ID 1"
>should I be making my data sources for the TableAdapters stored procedures
and Views instead?

TableAdapters can connect to a stored procedure or view to retrieve data
from database. In this case, you needn't config the complex queries by
yourself to retrieve the data and it will be more efficient when retrieving
data from database.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 3 '07 #4
I think my question may not have been clear enough. When I initially create a
TableAdapter I select a table, which returns all the records. Now, in some
training materials I have been going through, they suggest I use the Query
Builder to add filter logic to the script. Thus, I load the TableAdapters
Query Builder and add "WHERE CustomerID = @CustomerID" so that the Table
Adapter will only display recurds for the current customer selected. My
question is, in MS Access, the process would pull over all the data and then
filter it. But, in the case of SQL Server, the processing takes place on the
server and only returns the resultset. So, in this case, does the
TableAdapter pull over all the records and then filter the resultset, or are
only the resultset being returned?

Thank You.

"Linda Liu [MSFT]" wrote:
Hi Greg,
What I'm wonder is, does this TableAdapter work in the same manner as a
SQL Server Stored Procedure or View?

No, TableAdapter doesn't work in the same manner as a SQL Server Stored
Procedure or View. In fact, they are different concept.

A stored procedure consists of several SQL statements and compiled on the
SQL Server. A view is based on a table and has some filter conditions. Both
of them reside in database.

TableAdapters provide communication between your application and a
database. More specifically, a TableAdapter connects to a database,
executes queries or stored procedures, and either returns a new data table
populated with the returned data or fills an existing DataTable with the
returned data. TableAdapters are also used to send updated data from your
application back to the database.
does it work like MS Access where it pulls all the data over and then
filters it?

No, TableAdapter pulls the data and fill the returned data into a
DataTable. It doesn't filter the data. If you'd like to filter the data in
a DataTable, you could use a BindingSource or DataView to do it. The
following is a sample:

Dim table As New DataTable
Dim view As New DataView(table)
view.RowFilter = "ID1"

-or-

Dim bs As New BindingSource(table, "")
bs.Filter = "ID 1"
should I be making my data sources for the TableAdapters stored procedures
and Views instead?

TableAdapters can connect to a stored procedure or view to retrieve data
from database. In this case, you needn't config the complex queries by
yourself to retrieve the data and it will be more efficient when retrieving
data from database.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 4 '07 #5

"Greg" <Ac**********@newsgroups.nospamwrote in message
news:25**********************************@microsof t.com...
I think my question may not have been clear enough. When I initially
create a
TableAdapter I select a table, which returns all the records. Now, in some
training materials I have been going through, they suggest I use the Query
Builder to add filter logic to the script. Thus, I load the TableAdapters
Query Builder and add "WHERE CustomerID = @CustomerID" so that the Table
Adapter will only display recurds for the current customer selected. My
question is, in MS Access, the process would pull over all the data and
then
filter it. But, in the case of SQL Server, the processing takes place on
the
server and only returns the resultset. So, in this case, does the
TableAdapter pull over all the records and then filter the resultset, or
are
only the resultset being returned?

Thank You.
<snipped>

Only the resultset is being returned.

-ralph
Sep 5 '07 #6
Hi Greg,

Thank you for you reply!
in this case, does the TableAdapter pull over all the records and then
filter the esultset, or are only the resultset being returned?

In this case, the SQL command that the TableAdapter executes is like
'select * from customer where customerID = somevalue', so only the
resultset is being returned.

If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Sep 5 '07 #7
Hi Greg,

I am reviewing this post and would like to know the status of this issue.

If you have any question, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support

Sep 7 '07 #8

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

Similar topics

0
by: Tina | last post by:
I'm reading articles on the new TableAdapters where it says that a key new advantage is that a single TableAdapter, which can have multiple queries, can be used on multiple forms. Now that was in...
2
by: elnahrawi | last post by:
Download ebook http://books-download.com/?Book=1487-Visual+Basic+2005+Jumpstart Okay, all you VB6 developers--time's up. As of March 2005, Microsoft no longer supports this version of Visual...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
0
by: evilash | last post by:
Hi, am currently creating a website within visual studio 2005 and using the toolbox methods to insert into an access database. I am using a data set which is configured to my database (located in...
0
by: tiger00555 | last post by:
in reference to the below thread: http://bytes.com/groups/net-asp/344508-tableadapters-web-config does this issue still exist in visual studio 2008? I guess having a build environment with...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.