G
Glenn Thimmes
Hello,
I am trying to find the most efficient way to send record UPDATES from a
client to my webservice. I am already using GetChanged to only send the
records that have actually been modified, but I would like to further reduce
network traffic by not sending individual columns that were not modified.
My first attempt in doing this was to use SQL stored procs that have default
values that would be values that would never actually be used for these
fields. The update statement then evaluates each parameter to determine
whether it should really update each column. This works great on the SQL
Server side, and I've discovered that by leaving the Command Parameter value
as null (not DbNull), the default values would be invoked. The problem here
lies in determining if a value in my DataTable is DbNull because it was set
to null or if it is DbNull because it was not changed. It seems that I
cannot actually set fields in a datarow to be actual null (not DbNull).
Is there something I am missing here?
Moreover, is there something bigger that I am missing? Is there a better
solution for minimizing the amount of XML being sent from my client to my
webservice? I do realize that a possible solution would be to stop sending a
DataSet and just use my own XML specification that allowed for more
flexibility in minimizing packets being sent. But that solution seems to
negate a great deal of Microsoft technology that we hoped to be leveraging.
Thank you for any suggestions,
Glenn Thimmes
I am trying to find the most efficient way to send record UPDATES from a
client to my webservice. I am already using GetChanged to only send the
records that have actually been modified, but I would like to further reduce
network traffic by not sending individual columns that were not modified.
My first attempt in doing this was to use SQL stored procs that have default
values that would be values that would never actually be used for these
fields. The update statement then evaluates each parameter to determine
whether it should really update each column. This works great on the SQL
Server side, and I've discovered that by leaving the Command Parameter value
as null (not DbNull), the default values would be invoked. The problem here
lies in determining if a value in my DataTable is DbNull because it was set
to null or if it is DbNull because it was not changed. It seems that I
cannot actually set fields in a datarow to be actual null (not DbNull).
Is there something I am missing here?
Moreover, is there something bigger that I am missing? Is there a better
solution for minimizing the amount of XML being sent from my client to my
webservice? I do realize that a possible solution would be to stop sending a
DataSet and just use my own XML specification that allowed for more
flexibility in minimizing packets being sent. But that solution seems to
negate a great deal of Microsoft technology that we hoped to be leveraging.
Thank you for any suggestions,
Glenn Thimmes