|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using Typed Dataset with Winform vs ASP.NETI create a class library containing a typed dataset containing a single simple SQLServer table. When I build it, and reference this in a new ASP.NET project, I can use the ObjectDataSource to find the right object, link to my DataSet1, and using the TableAdapter source displayed, select the getData() function. When I display default.aspx, the table data displays as expected. Now for a Windows form. As ObjectDataSource candidates, I have both a DataTableBindingSource and a TableAdapterSource. The latter is useless, setting "ClearBeforeFill as a column name. The DataTableBindingSource sets up the correct columns, but when I display there is no data. Why is the Windows form so different, and is it possible to use typed data sets from a different project on Windows forms? Thanks, -- David R On Sat, 18 Feb 2006 15:09:27 -0800, "David R"
<Dav***@discussions.microsoft.com> wrote: Show quote >Something doesn't make sense here. Sad they gave that functionality to the ASP.NET guys but not the Win> >I create a class library containing a typed dataset containing a single >simple SQLServer table. When I build it, and reference this in a new ASP.NET >project, I can use the ObjectDataSource to find the right object, link to my >DataSet1, and using the TableAdapter source displayed, select the getData() >function. When I display default.aspx, the table data displays as expected. > >Now for a Windows form. As ObjectDataSource candidates, I have both a >DataTableBindingSource and a TableAdapterSource. The latter is useless, >setting "ClearBeforeFill as a column name. The DataTableBindingSource sets >up the correct columns, but when I display there is no data. > >Why is the Windows form so different, and is it possible to use typed data >sets from a different project on Windows forms? > >Thanks, Forms guys. I have been able to make objects work as a DataSource in Win apps, but was not able to use anything generated by the ObjectdataSource of ASP.NET. The two don't work the same, unfortunately. Otis Mukinfus http://www.otismukinfus.com http://www.tomchilders.com > Why is the Windows form so different, and is it possible to use typed data You are not the only one who asks this, AFAIK are there actions busy to > sets from a different project on Windows forms? > bring back some old Net 1.x ways back to ASPNET 2.0. However I nowhere have read what. It is just starting as I understood. In fact is the windowforms way not different. The way ASPNET uses in 2.0 is completely different from NET 1.x. Windowsforms is much more (not complete) consistent. (The ASPNET 2.0 method seems for me completely build around the designer). Just what I think I know at the moment. Cor On Sun, 19 Feb 2006 08:38:21 +0100, "Cor Ligthert [MVP]"
<notmyfirstn***@planet.nl> wrote: Show quote > I have done some experimenting with the ASP.NET ObjectDataSource>> Why is the Windows form so different, and is it possible to use typed data >> sets from a different project on Windows forms? >> >You are not the only one who asks this, AFAIK are there actions busy to >bring back some old Net 1.x ways back to ASPNET 2.0. However I nowhere have >read what. It is just starting as I understood. > >In fact is the windowforms way not different. The way ASPNET uses in 2.0 is >completely different from NET 1.x. Windowsforms is much more (not complete) >consistent. (The ASPNET 2.0 method seems for me completely build around the >designer). > >Just what I think I know at the moment. > >Cor > Cor, control and it works fairly well. The only book I have seen that really describes how to use it is "Murach's ASP.NET 2.0 Upgrader's Guide": http://www.murach.com/books/ugcs/index.htm In his book he goes into the 'dirty details' of how to use it. Otis Mukinfus http://www.otismukinfus.com http://www.tomchilders.com Otis,
>> I did that as well, it works very nice (as soon as you know that the "build" >>In fact is the windowforms way not different. The way ASPNET uses in 2.0 >>is >>completely different from NET 1.x. Windowsforms is much more (not >>complete) >>consistent. (The ASPNET 2.0 method seems for me completely build around >>the >>designer). >> > > I have done some experimenting with the ASP.NET ObjectDataSource > control and it works fairly well. > has some extra meanings). I tried the datatableadapter with webpage, webservice and with windowsform client connected to a webservice and than of course the ObjectDataSource. What I try to tell is that it is different from directly using a windowforms application. This 2.0 ASPNET methode is very different from 1.x and windowforms, and that I do not find fine to create good maintainable programs. Cor Thanks for the information.
Is there a way of using a typed dataset created in a class library, in a WinForm project? I could do this without a problem with ASP.NET, but not with WinForm. With the latter, I cannot find a way of returning a typed dataset from a class library. I can build a untyped dataset, but not the typed. -- Show quoteDavid R "Cor Ligthert [MVP]" wrote: > Otis, > > >> > >>In fact is the windowforms way not different. The way ASPNET uses in 2.0 > >>is > >>completely different from NET 1.x. Windowsforms is much more (not > >>complete) > >>consistent. (The ASPNET 2.0 method seems for me completely build around > >>the > >>designer). > >> > > > > I have done some experimenting with the ASP.NET ObjectDataSource > > control and it works fairly well. > > > I did that as well, it works very nice (as soon as you know that the "build" > has some extra meanings). I tried the datatableadapter with webpage, > webservice and with windowsform client connected to a webservice and than of > course the ObjectDataSource. > > What I try to tell is that it is different from directly using a windowforms > application. This 2.0 ASPNET methode is very different from 1.x and > windowforms, and that I do not find fine to create good maintainable > programs. > > Cor > > > On Mon, 20 Feb 2006 15:36:26 -0800, "David R" <Dav***@discussions.microsoft.com> I haven't tried it with .NET 2.0, but in .NET 1.1 you can create Typed DataSetswrote: >Thanks for the information. > >Is there a way of using a typed dataset created in a class library, in a >WinForm project? > >I could do this without a problem with ASP.NET, but not with WinForm. With >the latter, I cannot find a way of returning a typed dataset from a class >library. I can build a untyped dataset, but not the typed. David, on a component and use the component as the DAL. When adding a new object to the project choose component instead of class. Otis Mukinfus http://www.arltex.com http://www.tomchilders.com Thanks. You can create a ComponentClass as a new item in a project. I tried
this out, and it is an option. Did have one problem. I just happened to have a class named component.cs in the namespace that I was trying to create the component class, which generated an error in the designer. Renaming my class fixed the problem. -- Show quoteDavid R "Otis Mukinfus" wrote: > On Mon, 20 Feb 2006 15:36:26 -0800, "David R" <Dav***@discussions.microsoft.com> > wrote: > > >Thanks for the information. > > > >Is there a way of using a typed dataset created in a class library, in a > >WinForm project? > > > >I could do this without a problem with ASP.NET, but not with WinForm. With > >the latter, I cannot find a way of returning a typed dataset from a class > >library. I can build a untyped dataset, but not the typed. > David, > > I haven't tried it with .NET 2.0, but in .NET 1.1 you can create Typed DataSets > on a component and use the component as the DAL. When adding a new object to > the project choose component instead of class. > > Otis Mukinfus > http://www.arltex.com > http://www.tomchilders.com > Solved the problem, by returning the typed dataset as a data transfer object.
I can then use the same solution for both the ASP.NET and WinForm projects. Thanks! -- Show quoteDavid R "David R" wrote: > Something doesn't make sense here. > > I create a class library containing a typed dataset containing a single > simple SQLServer table. When I build it, and reference this in a new ASP.NET > project, I can use the ObjectDataSource to find the right object, link to my > DataSet1, and using the TableAdapter source displayed, select the getData() > function. When I display default.aspx, the table data displays as expected. > > Now for a Windows form. As ObjectDataSource candidates, I have both a > DataTableBindingSource and a TableAdapterSource. The latter is useless, > setting "ClearBeforeFill as a column name. The DataTableBindingSource sets > up the correct columns, but when I display there is no data. > > Why is the Windows form so different, and is it possible to use typed data > sets from a different project on Windows forms? > > Thanks, > -- > David R |
|||||||||||||||||||||||