Thursday, March 29, 2012
Performance of datatable.select() func against database query or
I am developing a webportal on VS2005 and ASP.NET 2.0
Using MsSQL SERVER 2005.
I have some static records(around 15000) in the database.These contents
never changed while the application is running.
what i m doing is querying the database only once at the
application_start event of the global.asax file and storing the records
in dataset...and further no query to database is done for this data.
wherever I need this data I fetch it from the dataset...through
datatable.select(filter expression) method.this is done several time for
a single page request and the website is high traffic portal.
Is it an efficient way of doing or there is any other better way by
which I can achieve the same..,as the amount of data is very
large...approx 15,000 records.
Plz Suggest me ........
Thanxxxxxxxxxxxxxx
Regards
Deepti Yadav
NoidaOK, I will suggest you. 15,000 rows for a select is a lot of data to displa
y
in an ASP.NET web application. Are your users realistically going to need to
see all 15,000 rows? why not have a more restrictive select with some sort
of paging mechanism if they want to move to the next page of results?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Mukesh" wrote:
> Hi all
> I am developing a webportal on VS2005 and ASP.NET 2.0
> Using MsSQL SERVER 2005.
> I have some static records(around 15000) in the database.These contents
> never changed while the application is running.
> what i m doing is querying the database only once at the
> application_start event of the global.asax file and storing the records
> in dataset...and further no query to database is done for this data.
> wherever I need this data I fetch it from the dataset...through
> datatable.select(filter expression) method.this is done several time for
> a single page request and the website is high traffic portal.
> Is it an efficient way of doing or there is any other better way by
> which I can achieve the same..,as the amount of data is very
> large...approx 15,000 records.
> Plz Suggest me ........
>
> Thanxxxxxxxxxxxxxx
> Regards
> Deepti Yadav
> Noida
>
Performance of datatable.select() func against database query orthe xquery
I am developing a webportal on VS2005 and ASP.NET 2.0
Using MsSQL SERVER 2005.
I have some static records(around 15000) in the database.These contents
never changed while the application is running.
what i m doing is querying the database only once at the
application_start event of the global.asax file and storing the records
in dataset...and further no query to database is done for this data.
wherever I need this data I fetch it from the dataset...through
datatable.select(filter expression) method.this is done several time for
a single page request and the website is high traffic portal.
Is it an efficient way of doing or there is any other better way by
which I can achieve the same..,as the amount of data is very
large...approx 15,000 records.
Plz Suggest me ........
Thanxxxxxxxxxxxxxx
Regards
Deepti Yadav
NoidaOK, I will suggest you. 15,000 rows for a select is a lot of data to display
in an ASP.NET web application. Are your users realistically going to need to
see all 15,000 rows? why not have a more restrictive select with some sort
of paging mechanism if they want to move to the next page of results?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Mukesh" wrote:
Quote:
Originally Posted by
>
Hi all
>
I am developing a webportal on VS2005 and ASP.NET 2.0
Using MsSQL SERVER 2005.
I have some static records(around 15000) in the database.These contents
never changed while the application is running.
>
what i m doing is querying the database only once at the
application_start event of the global.asax file and storing the records
in dataset...and further no query to database is done for this data.
wherever I need this data I fetch it from the dataset...through
datatable.select(filter expression) method.this is done several time for
a single page request and the website is high traffic portal.
>
Is it an efficient way of doing or there is any other better way by
which I can achieve the same..,as the amount of data is very
large...approx 15,000 records.
Plz Suggest me ........
>
>
Thanxxxxxxxxxxxxxx
>
Regards
>
Deepti Yadav
Noida
>
Hi Deepti,
Although you're not directly displaying all 15,000 records to end-user
(used DataTable.Select to filter), it's still not a good idea to cache all
15,000 records at server-side.
I would suggest to optimize at the database side: with careful index
design, I think you should get good performance when frequently selecting
from the table. After all, the database server also does pretty well to
cache data for frequently queried data.
Hope this helps.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Monday, March 26, 2012
periodic check for records to print
s
are created through WebForms on ASP.NET clients. The orders should not print
until
10 minutes before they are due.
The network printer will be available from the server running IIS and SQL
Server 2000.
If this were a Windows Forms application, then I would create a system timer
in Form1.Load(). How is this done in an ASP.NET application?Just a note of caution. Writing windows services can be tricky, so just be
prepared to possibly have to spend a little time with it. Debugging is a
little more complex and awkward.
Terry Burns
http://TrainingOn.net
"Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> You should separate the printing function from the rest of your ASP.NET
> forms
> application. The purpose of a web application is to deliver data over
> HTTP
> protocol using an HTTP client (browser). The application you described is
> most suitable for a service, i.e., create a windows service, that runs on
> your web (or any other) server connected to the desired printer.
> For detailed documentation on how to create a Windows Service:
> http://msdn.microsoft.com/library/d...r />
ations.asp
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
> "Tony" wrote:
>
Thanks for the advice to separate the printing function. I am a little
familiar with the service programming model. The last service I wrote was fo
r
NT 3.51 many many moons ago. I remember some limitations to accessing the GD
I
and databases.
My printing function must connect and access data on SQL Server and then
print. I read through the information at the url that Phillip provided and
all of the other pages in that section. I stll have a couple questions
remaining:
Is there tech support that documents the .NET namespaces that can be used
inside a windows service?
Can I use the ADO.NET functions inside a windows service?
Can I print a crystal report from a windows service,
or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
method from a windows service?
"Terry Burns" wrote:
> Just a note of caution. Writing windows services can be tricky, so just be
> prepared to possibly have to spend a little time with it. Debugging is a
> little more complex and awkward.
> --
> Terry Burns
> http://TrainingOn.net
> "Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
> news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
>
>
Hi Tony,
As long as the PC that will run the server has the .net framework installed
then all of the functions that you listed will be available to the Windows
Service, as it would to any desktop application. The main difference betwee
n
the Windows Service and the desktop application is that in the former you
would not display a GUI that requires user input.
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Tony" wrote:
> Thanks for the advice to separate the printing function. I am a little
> familiar with the service programming model. The last service I wrote was
for
> NT 3.51 many many moons ago. I remember some limitations to accessing the
GDI
> and databases.
> My printing function must connect and access data on SQL Server and then
> print. I read through the information at the url that Phillip provided and
> all of the other pages in that section. I stll have a couple questions
> remaining:
> Is there tech support that documents the .NET namespaces that can be used
> inside a windows service?
> Can I use the ADO.NET functions inside a windows service?
> Can I print a crystal report from a windows service,
> or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
> method from a windows service?
> "Terry Burns" wrote:
>
sorry for couple w
Now I have created my windows service
The printdocument.print function is NOT firing the printPage event.
I am using several eventlog.WriteEntry() statements to know how my program
is working and which functions are called. The structure of the program is
similar to the example in the PrintDocument Class documentation.
There is no microsoft.public.dotnet.service group, so I am not sure if this
dotnet.framework.aspnet group is the proper place to continue this discussio
n.
I will post the question again at microsoft.public.dotnet.framework and
include my source code.
btw, the data entry web pages are working very nicely...
"Phillip Williams" wrote:
> Hi Tony,
> As long as the PC that will run the server has the .net framework installe
d
> then all of the functions that you listed will be available to the Windows
> Service, as it would to any desktop application. The main difference betw
een
> the Windows Service and the desktop application is that in the former you
> would not display a GUI that requires user input.
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
> "Tony" wrote:
>
Found a caution from Microsoft not to do this.
"Classes within the System.Drawing.Printing namespace are not supported for
use within a Windows service or ASP.NET application or service. Attempting t
o
use these classes from within one of these application types may produce
unexpected problems, such as diminished service performance and run-time
exceptions.
"
found it at
http://windowssdk.msdn.microsoft.co...ng_printing.asp
"Tony" wrote:
> sorry for couple w
> Now I have created my windows service
> The printdocument.print function is NOT firing the printPage event.
> I am using several eventlog.WriteEntry() statements to know how my program
> is working and which functions are called. The structure of the program is
> similar to the example in the PrintDocument Class documentation.
> There is no microsoft.public.dotnet.service group, so I am not sure if thi
s
> dotnet.framework.aspnet group is the proper place to continue this discuss
ion.
> I will post the question again at microsoft.public.dotnet.framework and
> include my source code.
> btw, the data entry web pages are working very nicely...
> "Phillip Williams" wrote:
>
periodic check for records to print
are created through WebForms on ASP.NET clients. The orders should not print
until
10 minutes before they are due.
The network printer will be available from the server running IIS and SQL
Server 2000.
If this were a Windows Forms application, then I would create a system timer
in Form1.Load(). How is this done in an ASP.NET application?Just a note of caution. Writing windows services can be tricky, so just be
prepared to possibly have to spend a little time with it. Debugging is a
little more complex and awkward.
--
Terry Burns
http://TrainingOn.net
"Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> You should separate the printing function from the rest of your ASP.NET
> forms
> application. The purpose of a web application is to deliver data over
> HTTP
> protocol using an HTTP client (browser). The application you described is
> most suitable for a service, i.e., create a windows service, that runs on
> your web (or any other) server connected to the desired printer.
> For detailed documentation on how to create a Windows Service:
> http://msdn.microsoft.com/library/d...lications .asp
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
> "Tony" wrote:
>> Every 10 seconds I need to search a SQL table for orders to print. The
>> orders
>> are created through WebForms on ASP.NET clients. The orders should not
>> print
>> until
>> 10 minutes before they are due.
>>
>> The network printer will be available from the server running IIS and SQL
>> Server 2000.
>>
>> If this were a Windows Forms application, then I would create a system
>> timer
>> in Form1.Load(). How is this done in an ASP.NET application?
>>
>
Thanks for the advice to separate the printing function. I am a little
familiar with the service programming model. The last service I wrote was for
NT 3.51 many many moons ago. I remember some limitations to accessing the GDI
and databases.
My printing function must connect and access data on SQL Server and then
print. I read through the information at the url that Phillip provided and
all of the other pages in that section. I stll have a couple questions
remaining:
Is there tech support that documents the .NET namespaces that can be used
inside a windows service?
Can I use the ADO.NET functions inside a windows service?
Can I print a crystal report from a windows service,
or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
method from a windows service?
"Terry Burns" wrote:
> Just a note of caution. Writing windows services can be tricky, so just be
> prepared to possibly have to spend a little time with it. Debugging is a
> little more complex and awkward.
> --
> Terry Burns
> http://TrainingOn.net
> "Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
> news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> > You should separate the printing function from the rest of your ASP.NET
> > forms
> > application. The purpose of a web application is to deliver data over
> > HTTP
> > protocol using an HTTP client (browser). The application you described is
> > most suitable for a service, i.e., create a windows service, that runs on
> > your web (or any other) server connected to the desired printer.
> > For detailed documentation on how to create a Windows Service:
> > http://msdn.microsoft.com/library/d...lications .asp
> > --
> > HTH,
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> > "Tony" wrote:
> >> Every 10 seconds I need to search a SQL table for orders to print. The
> >> orders
> >> are created through WebForms on ASP.NET clients. The orders should not
> >> print
> >> until
> >> 10 minutes before they are due.
> >>
> >> The network printer will be available from the server running IIS and SQL
> >> Server 2000.
> >>
> >> If this were a Windows Forms application, then I would create a system
> >> timer
> >> in Form1.Load(). How is this done in an ASP.NET application?
> >>
> >>
>
Hi Tony,
As long as the PC that will run the server has the .net framework installed
then all of the functions that you listed will be available to the Windows
Service, as it would to any desktop application. The main difference between
the Windows Service and the desktop application is that in the former you
would not display a GUI that requires user input.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Tony" wrote:
> Thanks for the advice to separate the printing function. I am a little
> familiar with the service programming model. The last service I wrote was for
> NT 3.51 many many moons ago. I remember some limitations to accessing the GDI
> and databases.
> My printing function must connect and access data on SQL Server and then
> print. I read through the information at the url that Phillip provided and
> all of the other pages in that section. I stll have a couple questions
> remaining:
> Is there tech support that documents the .NET namespaces that can be used
> inside a windows service?
> Can I use the ADO.NET functions inside a windows service?
> Can I print a crystal report from a windows service,
> or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
> method from a windows service?
> "Terry Burns" wrote:
> > Just a note of caution. Writing windows services can be tricky, so just be
> > prepared to possibly have to spend a little time with it. Debugging is a
> > little more complex and awkward.
> > --
> > Terry Burns
> > http://TrainingOn.net
> > "Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
> > news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> > > You should separate the printing function from the rest of your ASP.NET
> > > forms
> > > application. The purpose of a web application is to deliver data over
> > > HTTP
> > > protocol using an HTTP client (browser). The application you described is
> > > most suitable for a service, i.e., create a windows service, that runs on
> > > your web (or any other) server connected to the desired printer.
> > > > For detailed documentation on how to create a Windows Service:
> > > http://msdn.microsoft.com/library/d...lications .asp
> > > > > --
> > > HTH,
> > > Phillip Williams
> > > http://www.societopia.net
> > > http://www.webswapp.com
> > > > > "Tony" wrote:
> > > >> Every 10 seconds I need to search a SQL table for orders to print. The
> > >> orders
> > >> are created through WebForms on ASP.NET clients. The orders should not
> > >> print
> > >> until
> > >> 10 minutes before they are due.
> > >>
> > >> The network printer will be available from the server running IIS and SQL
> > >> Server 2000.
> > >>
> > >> If this were a Windows Forms application, then I would create a system
> > >> timer
> > >> in Form1.Load(). How is this done in an ASP.NET application?
> > >>
> > >>
sorry for couple week delay as I moved from design to implementation ...
Now I have created my windows service
The printdocument.print function is NOT firing the printPage event.
I am using several eventlog.WriteEntry() statements to know how my program
is working and which functions are called. The structure of the program is
similar to the example in the PrintDocument Class documentation.
There is no microsoft.public.dotnet.service group, so I am not sure if this
dotnet.framework.aspnet group is the proper place to continue this discussion.
I will post the question again at microsoft.public.dotnet.framework and
include my source code.
btw, the data entry web pages are working very nicely...
"Phillip Williams" wrote:
> Hi Tony,
> As long as the PC that will run the server has the .net framework installed
> then all of the functions that you listed will be available to the Windows
> Service, as it would to any desktop application. The main difference between
> the Windows Service and the desktop application is that in the former you
> would not display a GUI that requires user input.
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
> "Tony" wrote:
> > Thanks for the advice to separate the printing function. I am a little
> > familiar with the service programming model. The last service I wrote was for
> > NT 3.51 many many moons ago. I remember some limitations to accessing the GDI
> > and databases.
> > My printing function must connect and access data on SQL Server and then
> > print. I read through the information at the url that Phillip provided and
> > all of the other pages in that section. I stll have a couple questions
> > remaining:
> > Is there tech support that documents the .NET namespaces that can be used
> > inside a windows service?
> > Can I use the ADO.NET functions inside a windows service?
> > Can I print a crystal report from a windows service,
> > or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
> > method from a windows service?
> > "Terry Burns" wrote:
> > > Just a note of caution. Writing windows services can be tricky, so just be
> > > prepared to possibly have to spend a little time with it. Debugging is a
> > > little more complex and awkward.
> > > > --
> > > Terry Burns
> > > http://TrainingOn.net
> > > > "Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
> > > news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> > > > You should separate the printing function from the rest of your ASP.NET
> > > > forms
> > > > application. The purpose of a web application is to deliver data over
> > > > HTTP
> > > > protocol using an HTTP client (browser). The application you described is
> > > > most suitable for a service, i.e., create a windows service, that runs on
> > > > your web (or any other) server connected to the desired printer.
> > > > > > For detailed documentation on how to create a Windows Service:
> > > > http://msdn.microsoft.com/library/d...lications .asp
> > > > > > > > --
> > > > HTH,
> > > > Phillip Williams
> > > > http://www.societopia.net
> > > > http://www.webswapp.com
> > > > > > > > "Tony" wrote:
> > > > > >> Every 10 seconds I need to search a SQL table for orders to print. The
> > > >> orders
> > > >> are created through WebForms on ASP.NET clients. The orders should not
> > > >> print
> > > >> until
> > > >> 10 minutes before they are due.
> > > >>
> > > >> The network printer will be available from the server running IIS and SQL
> > > >> Server 2000.
> > > >>
> > > >> If this were a Windows Forms application, then I would create a system
> > > >> timer
> > > >> in Form1.Load(). How is this done in an ASP.NET application?
> > > >>
> > > >>
> > >
Found a caution from Microsoft not to do this.
"Classes within the System.Drawing.Printing namespace are not supported for
use within a Windows service or ASP.NET application or service. Attempting to
use these classes from within one of these application types may produce
unexpected problems, such as diminished service performance and run-time
exceptions.
"
found it at
http://windowssdk.msdn.microsoft.co...ng_printing.asp
"Tony" wrote:
> sorry for couple week delay as I moved from design to implementation ...
> Now I have created my windows service
> The printdocument.print function is NOT firing the printPage event.
> I am using several eventlog.WriteEntry() statements to know how my program
> is working and which functions are called. The structure of the program is
> similar to the example in the PrintDocument Class documentation.
> There is no microsoft.public.dotnet.service group, so I am not sure if this
> dotnet.framework.aspnet group is the proper place to continue this discussion.
> I will post the question again at microsoft.public.dotnet.framework and
> include my source code.
> btw, the data entry web pages are working very nicely...
> "Phillip Williams" wrote:
> > Hi Tony,
> > As long as the PC that will run the server has the .net framework installed
> > then all of the functions that you listed will be available to the Windows
> > Service, as it would to any desktop application. The main difference between
> > the Windows Service and the desktop application is that in the former you
> > would not display a GUI that requires user input.
> > --
> > HTH,
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> > "Tony" wrote:
> > > Thanks for the advice to separate the printing function. I am a little
> > > familiar with the service programming model. The last service I wrote was for
> > > NT 3.51 many many moons ago. I remember some limitations to accessing the GDI
> > > and databases.
> > > > My printing function must connect and access data on SQL Server and then
> > > print. I read through the information at the url that Phillip provided and
> > > all of the other pages in that section. I stll have a couple questions
> > > remaining:
> > > > Is there tech support that documents the .NET namespaces that can be used
> > > inside a windows service?
> > > Can I use the ADO.NET functions inside a windows service?
> > > Can I print a crystal report from a windows service,
> > > or can I use the GDI+ and System.Drawing.Printing.PrintDocument.Print()
> > > method from a windows service?
> > > > "Terry Burns" wrote:
> > > > > Just a note of caution. Writing windows services can be tricky, so just be
> > > > prepared to possibly have to spend a little time with it. Debugging is a
> > > > little more complex and awkward.
> > > > > > --
> > > > Terry Burns
> > > > http://TrainingOn.net
> > > > > > "Phillip Williams" <WEBSWAPP@.newsgroups.nospam> wrote in message
> > > > news:B765641F-9B69-47A5-B8AB-1C1A1662EE46@.microsoft.com...
> > > > > You should separate the printing function from the rest of your ASP.NET
> > > > > forms
> > > > > application. The purpose of a web application is to deliver data over
> > > > > HTTP
> > > > > protocol using an HTTP client (browser). The application you described is
> > > > > most suitable for a service, i.e., create a windows service, that runs on
> > > > > your web (or any other) server connected to the desired printer.
> > > > > > > > For detailed documentation on how to create a Windows Service:
> > > > > http://msdn.microsoft.com/library/d...lications .asp
> > > > > > > > > > > --
> > > > > HTH,
> > > > > Phillip Williams
> > > > > http://www.societopia.net
> > > > > http://www.webswapp.com
> > > > > > > > > > > "Tony" wrote:
> > > > > > > >> Every 10 seconds I need to search a SQL table for orders to print. The
> > > > >> orders
> > > > >> are created through WebForms on ASP.NET clients. The orders should not
> > > > >> print
> > > > >> until
> > > > >> 10 minutes before they are due.
> > > > >>
> > > > >> The network printer will be available from the server running IIS and SQL
> > > > >> Server 2000.
> > > > >>
> > > > >> If this were a Windows Forms application, then I would create a system
> > > > >> timer
> > > > >> in Form1.Load(). How is this done in an ASP.NET application?
> > > > >>
> > > > >>
> > > > > >
Friday, March 16, 2012
Persist data in XML data island
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFTNGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on the
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> > I want to use an XML data island to display editable records to a user
> > on the cleint side. The user should be able to scroll through the
> > records, modify any or all fields in any or all records, add records,
> > and delete records.
> > As far as I can see, there are a couple of ways to implement this. I
> > could persist the original data island and create a duplicate data
> > island that the user would modify. When the modifications were
> > complete, I could post back both XML snippets and compare them to see
> > what has changed.
> > Alternatively, I was thinking about using the DiffGram idea, where
> > each change would add an xml element to an xml snippet that would
> > indicate what item was changed, added, deleted, etc.
> > I know that I am not the first person to want to use this type of
> > technique, so I was hoping that there is something built into the .Net
> > framework to help with the management of the data. Ideally, I would
> > like to do something like serialize a dataset to XML, send it to the
> > client as an XML data island, have them manipulate it, repost it, and
> > then turn it "magically" into a batch update to the dataset on the
> > server side. Is that possible, or do I have to roll my own solution?
> > Thanks.
> > Pat
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Persist data in XML data island
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.com...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFT
NGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on t
he
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.com...
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!