Hello,
I am trying to write a webservice to compare 2 datasets, one recieved
from a client, and the other taken from a database on the webserver.
Sofar, I have had little success in accomplishing that, but that may
be due to the fact that I'm a relative newbie on C# :-)
Does anybody have a clue, a hint, or maybe even some sample code?
Thanks in advance 1 10418
Hi
i just had this idea that you might want to try
First try to get a copy of one of your datasets in an new dataset lets say
you have datasets D1 & D2
DataSet copy = D1;
Set use accept changes on copy so you preserve its state
copy.AcceptChan ges();//we did that so when we do the merge we know that
changes in //the copy will only come from D2
Then make "copy" equal to the merge of D1 and D2 ,since it already has D1
so you will do the following
Copy.Merge(D2);//make copy a merge to D1 and D2
Then we get the changes that happed on copy by the merge on a new dataset
" lets say changes
DataSet Changes = copy.GetChanges ();
Then we see if changes has no data then we know that the 2 dataset
origanlly had the samedata ( me be we should apply AcceptChanges on D2 as
well before we do the merge )
Hope this solution meet your needs This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jacew |
last post by:
I want to compare two datasets and retireive the differences. Is the an easy
way to do this without trawling through the all records and fields?
The basic problem is this. I get a dataset and copy it. I then load the data
into a web form. The user then makes any changes to the form. when he saves
the form data all the fields are written back to the dataset whether there
have been any changes or not. I then want to compare this saved dataset...
|
by: Alpha |
last post by:
I have a small Window application and through out the different forms I
create a different dataset. At the begining I used the Tools to drag and
drop the SqlDataAdapter, connection and dataset objects to the frist few
forms but then later I removed those and created these objects in my code.
I now see 3 datasets in the Solution Explorer panel part but not all the
datasets that I have in my codes. Are these 3 datasets leftover from the...
|
by: Elliot M. Rodriguez |
last post by:
I can accomplish this relatively easily but inefficiently, and it seems like
a hack, but I cant think of a better workaround. Hopefully someone else here
can.
My task is to perform an update on a dataset retrieved from SQL Server 2000
using a stored procedure. This is the base dataset. Users will send an Excel
document up to a webserver and that excel document, which matches the schema
of the SQL dataset (few differences but nothing ...
|
by: Will Lastname |
last post by:
In one of the applications that I'm working on I have 2 sets of
functions that build different datasets.
Imagine 4 columns in a datagrid. Inside those 4 columns I have nested
datalists. Two of the datalists' datasources point to database A and
the other two point to database B. This effect allows the client to
perform a side-by-side comparison of the same product so that records
can be updated accordingly. It's easy enough to scroll down...
|
by: GaryDean |
last post by:
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...
| |
by: Frank |
last post by:
Hello,
Developing an app where the user fills out a sometimes quite lengthy
form of chkboxes, txtboxes, radbtns, etc. User responses are saved to
a mySql db, which the user can later edit.
When the user chooses to edit, I pull the responses from the db, toss
them in a dataset, check the checks, fill the txtboxes, etc.,etc.
The user then adds, deletes, or changes entries as needed and clicks
the Save Changes button. Here is where the fun...
|
by: S.Tedeschi |
last post by:
Hi all;
as posted some days ago, I'm converting an on-line app; I used to
heavily rely on strongly-typed DataSets directly dropped onto pages,
and so viewed by code(-behind) as well. In the next two weeks I
discovered that such objects are no more directly usable in pages,
namely in DataGrid which don't see them any more. Even if rebuilt in
Component Designer, and so visible in code, DataSets are invisible in
Page Designer, so now it's...
|
by: Franck |
last post by:
how come unchanged always true even if data changed
This code come from my saving button:
============================================
DataSet ds1 = new DataSet();
DataSet ds2 = new DataSet();
DataSet ds3 = new DataSet();
//Static Dataset which contain values when my form load
|
by: BillE |
last post by:
I'm trying to decide if it is better to use typed datasets or business
objects, so I would appreciate any thoughts from someone with more
experience.
When I use a business object to populate a gridview, for example, I loop
through a datareader, populating an array list with instances of a custom
class in the middle tier, and then send the array list up to the
presentation layer and bind the gridview to it.
If I use a typed dataset, I...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |