DataAdapter in vs2008

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
 
S

Scott M.

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
 
G

Gregory A. Beamer

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! |
*******************************************
 
G

Gregory A. Beamer

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! |
*******************************************
 
G

Gregory A. Beamer

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! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top