PC Review


Reply
Thread Tools Rate Thread

DataAdapter in vs2008

 
 
John
Guest
Posts: n/a
 
      12th Jul 2009
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


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      13th Jul 2009
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

"John" <(E-Mail Removed)> wrote in message
news:%23Z%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      15th Jul 2009
"John" <(E-Mail Removed)> wrote in
news:#Z#(E-Mail Removed):

> 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/archi.../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! |
*******************************************
 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      15th Jul 2009
"Scott M." <s-(E-Mail Removed)> wrote in
news:eqGnBR#(E-Mail Removed):

> 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! |
*******************************************
 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      16th Jul 2009
Yes, as I said it is a Visual Studio created entity.


"Gregory A. Beamer" <(E-Mail Removed)> wrote in message
news:Xns9C4961944F088gbworld@207.46.248.16...
> "Scott M." <s-(E-Mail Removed)> wrote in
> news:eqGnBR#(E-Mail Removed):
>
>> 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! |
> *******************************************



 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      17th Jul 2009
John,'

Do you want the sample in F# or in another program language?

Cor

"John" <(E-Mail Removed)> wrote in message
news:%23Z%(E-Mail Removed)...
> 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
>
>


 
Reply With Quote
 
Gregory A. Beamer
Guest
Posts: n/a
 
      17th Jul 2009
"Scott M." <s-(E-Mail Removed)> wrote in
news:u$(E-Mail Removed):

> 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! |
*******************************************
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      18th Jul 2009
c# or vb.net would do. unless its sarcasm

Thanks

Regards

"Cor Ligthert[MVP]" <(E-Mail Removed)> wrote in message
news:Ot$(E-Mail Removed)...
> John,'
>
> Do you want the sample in F# or in another program language?
>
> Cor
>
> "John" <(E-Mail Removed)> wrote in message
> news:%23Z%(E-Mail Removed)...
>> 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
>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vs2008 Puja Patel Microsoft Dot NET Framework 0 1st Oct 2008 02:44 AM
Upgrading from VS2008 standard to VS2008 Pro? ker_01 Microsoft Dot NET 0 11th Aug 2008 06:00 PM
upgrade from VS2008 standard to VS2008 pro- options? ker_01 Microsoft Dot NET 0 29th May 2008 04:42 PM
Importing forms from vs2005 > vs2008 manually. How do i make vs2008 recognise them as forms? Claire Microsoft C# .NET 2 13th Mar 2008 02:35 PM
difference between dataAdapter.InsertCommand/dataAdapter.SelectCom =?Utf-8?B?UmljaA==?= Microsoft VB .NET 3 10th Nov 2006 03:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:31 AM.