DataAdapter in vs2008

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have configured a data source and strongly types dataset in my winfrom
app. I dragged one of the tables to my form. All I see on my form and in
dataset are tableadapters. Is there a way to use dataadapter via code in
vs2008? A short code example would be much appreciated. The reason I want to
use dataadapter instead of tableadapter is that I need to change the select
command at runtime.

Many Thanks

Regards
 
The DataAdapter type is still part of the Framework and you can still code
against it with no problems. MS has created a Visual Studio entity called a
TableAdapter, which offers the same kind of functionality as the
DataAdapter, but with more features.

See my response to you other post for links on how to use it.

-Scott
 
Hi

I have configured a data source and strongly types dataset in my
winfrom app. I dragged one of the tables to my form. All I see on my
form and in dataset are tableadapters. Is there a way to use
dataadapter via code in vs2008? A short code example would be much
appreciated. The reason I want to use dataadapter instead of
tableadapter is that I need to change the select command at runtime.


If the drag and drop goodness is what you want, but you also want
something it does not give you, then code it in. In this case, it should
be as simple as exposing the underlying select query, as a table adapter
sits on top of the DataAdapter class.

http://weblogs.asp.net/dwahlin/archive/2006/08/31/Enhancing-
TableAdapters.aspx


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
The DataAdapter type is still part of the Framework and you can still
code against it with no problems. MS has created a Visual Studio
entity called a TableAdapter, which offers the same kind of
functionality as the DataAdapter, but with more features.


It is a "custom" generated class from the GUI drag and drop the user did on
a DataSet. It is not a Framework class, however (not suggesting you did not
know this, but others read this forum). The framework class is DataAdapter.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Yes, as I said it is a Visual Studio created entity.

Reread your post and I guess I was just reading it incorrectly before.
Thanks for the follow up.



--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top