PC Review


Reply
Thread Tools Rate Thread

How do I generate a data adapter for a typed dataset?

 
 
Ken Varn
Guest
Posts: n/a
 
      21st May 2004
I have a typed DataSet in which I would like to generate a matching
DataAdapter. I tried using oleDBCommandBuilder class, but it does not seem
to create any table or column mappings. Is there someway to automatically
generate a DataAdapter that is matched up to a typed DataSet with all of the
table and column mappings built automatically from the typed DataSet?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------


 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      21st May 2004
The commandBuilder infers its logic from the select statement and I don't
believe there's any issue with using it with a typed dataset. You match the
CB to an Adapter and the mapping is done for you if the there's a select
statement and the table has a key. CommandBuilders are a bit lame though so
if you may want to use the DataAdapterConfiguration wizard or preferably you
can roll your own update logic. If you do this you'll have a lot better
control over concurrency and you can fine tune your update.

Bill Vaughn has a great article on this at www.betav.com ->Articles ->
MSDN ->Weaning developers from the commandbuilder.

Good luck,

Bill

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
"Ken Varn" <nospam> wrote in message
news:(E-Mail Removed)...
> I have a typed DataSet in which I would like to generate a matching
> DataAdapter. I tried using oleDBCommandBuilder class, but it does not

seem
> to create any table or column mappings. Is there someway to automatically
> generate a DataAdapter that is matched up to a typed DataSet with all of

the
> table and column mappings built automatically from the typed DataSet?
>
> --
> -----------------------------------
> Ken Varn
> Senior Software Engineer
> Diebold Inc.
>
> EmailID = varnk
> Domain = Diebold.com
> -----------------------------------
>
>



 
Reply With Quote
 
Ken Varn
Guest
Posts: n/a
 
      21st May 2004
I looked into using the DataAdapterConfiguration wizard, but you can only
access it when you are putting a DataAdapter onto a form. Is there anyway
to get to the wizard outside of the form editor in VS.NET?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
"William Ryan eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The commandBuilder infers its logic from the select statement and I don't
> believe there's any issue with using it with a typed dataset. You match

the
> CB to an Adapter and the mapping is done for you if the there's a select
> statement and the table has a key. CommandBuilders are a bit lame though

so
> if you may want to use the DataAdapterConfiguration wizard or preferably

you
> can roll your own update logic. If you do this you'll have a lot better
> control over concurrency and you can fine tune your update.
>
> Bill Vaughn has a great article on this at www.betav.com ->Articles ->
> MSDN ->Weaning developers from the commandbuilder.
>
> Good luck,
>
> Bill
>
> --
>
> W.G. Ryan, eMVP
>
> http://forums.devbuzz.com/
> http://www.knowdotnet.com/williamryan.html
> http://www.msmvps.com/WilliamRyan/
> "Ken Varn" <nospam> wrote in message
> news:(E-Mail Removed)...
> > I have a typed DataSet in which I would like to generate a matching
> > DataAdapter. I tried using oleDBCommandBuilder class, but it does not

> seem
> > to create any table or column mappings. Is there someway to

automatically
> > generate a DataAdapter that is matched up to a typed DataSet with all of

> the
> > table and column mappings built automatically from the typed DataSet?
> >
> > --
> > -----------------------------------
> > Ken Varn
> > Senior Software Engineer
> > Diebold Inc.
> >
> > EmailID = varnk
> > Domain = Diebold.com
> > -----------------------------------
> >
> >

>
>



 
Reply With Quote
 
William Ryan eMVP
Guest
Posts: n/a
 
      21st May 2004
As stated you are correct, the wizard only works via the designer. If you
don't want to use the designer and aren't into commandbuilders or the method
Bill mentions at the link I sent you before , you can use a Template to
accomplish what you want, check out Miha Markic's site
http://www.rthand.com/Default.aspx?Page=2&SubPage=1 under the Generate Save
Adapter.

As an aside, it almost sounds like you are looking for an ORM tool if you
want something to automatically generate your data access logic... you may
want to take a loot at www.deklarit.com and/or LLBLGenPro, both of which
kick a33. We have a discussion forum on ORM here
http://forums.devbuzz.com/Using_OR%2...umid_28/tt.htm

Also. you may notice I mention Kathleen Dollard's new book on Code
Generation. She discusses this topic and ORM in Chapter 6 and it's a really
well done discussion.

Code generation is very cool and using templates like Miha illustrates is
another really neat technique. Even if you decide that it's not for you, I
think you'll be glad you looked into it if you check out his stuff,
Deklarit's product or Frans' stuff and/or Kathleen's book.
--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
"Ken Varn" <nospam> wrote in message
news:e$(E-Mail Removed)...
> I looked into using the DataAdapterConfiguration wizard, but you can only
> access it when you are putting a DataAdapter onto a form. Is there anyway
> to get to the wizard outside of the form editor in VS.NET?
>
> --
> -----------------------------------
> Ken Varn
> Senior Software Engineer
> Diebold Inc.
>
> EmailID = varnk
> Domain = Diebold.com
> -----------------------------------
> "William Ryan eMVP" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > The commandBuilder infers its logic from the select statement and I

don't
> > believe there's any issue with using it with a typed dataset. You match

> the
> > CB to an Adapter and the mapping is done for you if the there's a select
> > statement and the table has a key. CommandBuilders are a bit lame

though
> so
> > if you may want to use the DataAdapterConfiguration wizard or preferably

> you
> > can roll your own update logic. If you do this you'll have a lot better
> > control over concurrency and you can fine tune your update.
> >
> > Bill Vaughn has a great article on this at www.betav.com ->Articles ->
> > MSDN ->Weaning developers from the commandbuilder.
> >
> > Good luck,
> >
> > Bill
> >
> > --
> >
> > W.G. Ryan, eMVP
> >
> > http://forums.devbuzz.com/
> > http://www.knowdotnet.com/williamryan.html
> > http://www.msmvps.com/WilliamRyan/
> > "Ken Varn" <nospam> wrote in message
> > news:(E-Mail Removed)...
> > > I have a typed DataSet in which I would like to generate a matching
> > > DataAdapter. I tried using oleDBCommandBuilder class, but it does not

> > seem
> > > to create any table or column mappings. Is there someway to

> automatically
> > > generate a DataAdapter that is matched up to a typed DataSet with all

of
> > the
> > > table and column mappings built automatically from the typed DataSet?
> > >
> > > --
> > > -----------------------------------
> > > Ken Varn
> > > Senior Software Engineer
> > > Diebold Inc.
> > >
> > > EmailID = varnk
> > > Domain = Diebold.com
> > > -----------------------------------
> > >
> > >

> >
> >

>
>



 
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
How to generate a strongly typed dataset from untyped dataset? =?Utf-8?B?UGV0ZXI=?= Microsoft VB .NET 0 24th Aug 2007 08:08 AM
Populate Strongly Typed Dataset - without "Configure Data Adapter" itinsley@gmail.com Microsoft ADO .NET 3 13th Jan 2006 02:09 AM
How to select DISTINCT when using typed dataset and a ole data adapter? Henke Microsoft ADO .NET 4 30th Mar 2004 11:03 PM
SQL Stmt ( Adapter ) --> Typed DataSet --> DataGrid. MeDhanush Microsoft ADO .NET 0 8th Sep 2003 09:09 PM
Problem updating existing typed dataset from Generate Dataset designer Eric Kennedy Microsoft ADO .NET 0 29th Aug 2003 06:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:36 AM.