PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
How do I generate a data adapter for a typed dataset?
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
How do I generate a data adapter for a typed dataset?
![]() |
How do I generate a data adapter for a typed dataset? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 ----------------------------------- |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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:Os4oU01PEHA.556@tk2msftngp13.phx.gbl... > 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 > ----------------------------------- > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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" <dotnetguru@comcast.nospam.net> wrote in message news:u8IxLm2PEHA.556@TK2MSFTNGP10.phx.gbl... > 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:Os4oU01PEHA.556@tk2msftngp13.phx.gbl... > > 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 > > ----------------------------------- > > > > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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%...rumid_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$Erss2PEHA.2132@TK2MSFTNGP11.phx.gbl... > 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" <dotnetguru@comcast.nospam.net> wrote in message > news:u8IxLm2PEHA.556@TK2MSFTNGP10.phx.gbl... > > 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:Os4oU01PEHA.556@tk2msftngp13.phx.gbl... > > > 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 > > > ----------------------------------- > > > > > > > > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

