RE: 2.0 DataSources vs. TableAdapter/Datasets

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi Gary,

Welcome.
As for the TableAdapter's different design mode and behavior in .net 2.0
winform app and asp.net application ,here are some of my understanding and
suggestions:

For the different design-time support and behavior on using TableAdpater
components in winform application and asp.net application, it is due to the
different underlying application nature and programming model. Winform
application is desktop app where all the class instances and componets live
in the application's memorty space as long as the application keep alive...
While for asp.net application, it is request/response based, asp.net page
instance only live when a request arrive server and being processed, after
request finished, the page object will disposed(also, mulitple page
instances won't have relations to each other.... ) , so we should not use
the same programming model as winform app.

For sharing component instance or class objects in asp.net application, we
can use the following means:

1. Create the shared component instance and store it in a global wide
storage, e.g the ApplicationState or Application Cache is the reasonable
place for storing such component....

2. Also, if your applcation always running in a single appdomain, you can
consider using a certain class's public static member property to hold such
shared data or resources so that all the pages requests can reference those
shared objects....

In addition, ASP.NET appliation in VS.NET can help us create typed dataset
and a TableAdapter through design surface, however, as I mentioned, due to
the different programming model, ASP.NET will have limited support on using
TableAdpater as winform application at design-time.... but since
TableAdapter has encapsulated most code, we can just declare certain
vartiables and create the instance to use them.....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





--------------------
| From: "GaryDean" <GaryDean@xxxxxxxxxxxxxxxxx>
| Subject: 2.0 DataSources vs. TableAdapter/Datasets
| Date: Sat, 31 Dec 2005 14:29:31 -0800
| Lines: 25
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <epK1rmlDGHA.644@xxxxxxxxxxxxxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367882
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have been noticing that questions on vs.2005/2.0 don't appear to get
much
| in answers so I'm reposting some questions posted by some of the
programmers
| here in our organization that never got answered...
|
| There are articles on the new TableAdapters where it says that a key new
| advantage is that a single TableAdapter, which can have multiple queries,
| can be used on multiple forms. Now that was in an article on using
| TableAdapters with Forms Apps. There is a DataSource window that stores
| common datasources for the whole project (accessed via the Data menu
item).
|
| Now, back to ASP apps - there is no Data on the menu, no datasource
window,
| and it looks like TableAdapters need to be generated from a DataSource
| dropped on a page. Does this mean that aspx pages won't be able to share
| TableAdapters?
|
| Also, in Form apps the IDE guids us to create the new 2.0 .XSD datasets
that
| have TableAdapters where the ASP IDE guids us to create DataSources that
| don't create .XSDs with TableAdapters. Why the difference?
|
|
| --
| Regards,
| Gary Blakely
|
|
|

.



Relevant Pages

  • Re: 2.0 DataSources vs. TableAdapter/Datasets
    ... I can create a .xsd and TableAdapter for an ASP app in design time. ... it has us creating DataSources for our gridviews that puts SQL in our ASPX ... > | There are articles on the new TableAdapters where it says that a key new ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Starting exe from WebService
    ... Ok, when you said it was WinForm app that you were trying to execute, I ... > WebService because the program is complicated and I don't ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Relationship between Application.Exit() and AppDomain
    ... Yes, the app we are writing is being coded in Winform, it's not a Web ... trying to create an app that would host some other applications, either GUI ... AppDomain to host the 3rd party code for security/robustness reason? ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Winform vs Webform: how to choose?
    ... installling /desinstalling automatica when you no use bat always when you ... > new application becomes a Winform vs a Webform application. ... > that every app should be, by default, a Winform app unless it positively ... Visual Studio could never be a Webform app because it requires ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Taskvisible and NotifyIcon. Not supported. Why?
    ... QB has to be able to launch the app automatically, ... > TaskVisible Property Changes in Visual Basic .NET ... the other is a WinForm application. ... > responsible for background data manipulation say, ...
    (microsoft.public.dotnet.general)