| |   Skin:   
      User: Not logged in 
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Featured Articles
Book Chapters
Training Courses
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
About Me
My Blog
HeadGeek Articles
Talking Portfolio
World Trip Pics

Multiple Fill commands for the TableAdapter
Author: Duray AKAR
Published: 12/5/2005 3:35 PM
Category: ADO.NET, C#, VB.NET, VS.NET, Whidbey
Summary: I was searching the web to find out about how to add multiple Fill commands to a TableAdapter. could not really find a "point blank" guidance. So, here it is...



You all read about the buzz and the fuss about ADO.NET 2.0 TableAdapter, how easy and powerful it is, how coll e.t.c. One of the most intriguing features is to be able to have multiple TYPED Fill methods for a given TableAdapter.

But HOW???

Google it, and you will be surprised about how many people are talking about it, bot nobody is telling "how"..

I will skip the details about how to create a DataSet in Visual Studio 2005 , because that can be found very easily.

  1. Open your DataSet designer in Visual Studio 2005.
  2. Right click the TableAdapter
  3. Select Add > Query
  4. Follow the steps in the TableAdapter Query Configuration Wizard

You will see how easily you can get multiple fill commands for your TableAdapter.

To summarize the benefits, for the very same table, you get strongly typed, parametrized methods such as :

FillByID(ID as integer) as integer

FillByName(Name as string) as integer

FillByCategory(Category as integer) as integer

FillByCategoryStatus(category as integer, status as string ) as integer

So that you do not need to worry about the data types or the number of parameters in the stored procedures when calling them anymore. You have your function defined with the correct number of parameters and corresponding .net DataTypes, buolt in right into the typed dataset you just created :)

Hope it helps

Duray AKAR


Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”

Advertise on XMLPitstop

Advertise on XMLPitstop

EggHead Cafe
Web Servicee development
Buy text ads here!
remote online storage
Color Laser Printer
Chanel sunglasses
Skype vs. sipcall
VoIP Internettelefonie
Buy text ads here!

Interested in Text ads?
2,223 Total Members
36 members(last 30 days)
8 members(last 7 days)
2 members(today)

1,609 Total Discussions
12 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

17,260 Total Blog Posts
1,839 Blogs(last 30 days)
342 Blogs(last 7 days)
49 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,786 Total Resources
5 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


David Silverlight's| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139