I'm using two datasets DS1 & DS2 (both hold data with same schema) in VB.Net 1.1
DS1 is main datasets and DS2 is like subset to DS1.Now how should i remove datarows from DS1 that are like in DS2.
Thanks In Advance.
Sonymathur.
3 2167
If you have unique fields in each row, i.e. an "ItemNumber " then simply comapre them. I do something simililar in my program:
If <comparison logic of unique fields> Then
Dataset.Tables( "table1").Rows. RemoveAt(rowind ex)
End If
the rowindex was determined earlier in the program.
With more information I can give an example closer to your scenerio. I hope this helps you in figuring out your problem!!!
Cyberdaemon
If you have unique fields in each row, i.e. an "ItemNumber " then simply comapre them. I do something simililar in my program:
If <comparison logic of unique fields> Then
Dataset.Tables( "table1").Rows. RemoveAt(rowind ex)
End If
the rowindex was determined earlier in the program.
With more information I can give an example closer to your scenerio. I hope this helps you in figuring out your problem!!!
Cyberdaemon
Thanks for ur Help
I did the same as you explained but the problem is the dataset has around 5000 records and some 4994 row is missing in the dataset so how to check if all the data rows exist in the dataset or not ?
Thanks in Advance
Sonymathur
what do you mean you have 5000 records but 4994 are missing? could you post a code snippet of where your problems lies so I can further assist?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: cody |
last post by:
I've seen an Introduction on ADO.NET with its Datasets on .NET TV and Iam
now wondering how it is realized/used in real world applications.
I don't believe that one would create a dataset and add relations to it and
so on for every table in the application, this would be a real mess and this
has nothing to do with OOP.
Normally, would would create a class Customer, a class Invoices, Positions,
Articles and so on.
But how can this be...
|
by: malcolm |
last post by:
Hello,
We have a robust (.NET 1.1 c# winforms) client-server application that
utilizes many typed DataSets, typed DataTables and typed DataRows. Our
application is a series of windows and popup windows where you can
edit information and data, nothing out of the ordinary. I estimate we
have something like 50 to 100 tables and/or views in our database each
of which map to one strongly typed DataTable. Now we have some odd 20
to 30 typed...
|
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: cj |
last post by:
I've used datatables and datasets before. Datasets being able to hold
more than one table and datatables being only one table. My mind keeps
coming up with recordsets. I can't remember how they fit into the picture.
I'm going to be reading some records from a table in a sql db.
|
by: Luqman |
last post by:
Is it recommended to use datasets in ASP.Net 2.0 / VS.Net 2005 ?
Best Regards,
Luqman
| |
by: Ronald S. Cook |
last post by:
I've always used untyped datasets. In a Microsoft course, it walks through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard... code gen, code gen, code
gen.
What's at the end looks slick, but then there's a ton of generated code that
I'm going to have to maintain now.
I.e. I like typing things myself (don't like wizards) so I can know exactly
what I've done.
|
by: =?Utf-8?B?UmljY2FyZG8=?= |
last post by:
What is the best method to compare 2 array to knw if each element is equal?
Now, i have to compare the datarow.itemarray of 2 datarows wich is equals in
structure.
I tried to write this routine: (OPTION STRICT MUST BE ON!!)
Private Function ISArrayEquals(ByVal A As Array, ByVal B As Array) As
Boolean
For index As Integer = 0 To A.Length - 1
If A.GetValue(index) <B.GetValue(index) Then '<----Here is the error!
Return False
End If
|
by: RB0135 |
last post by:
Hi,
I need to compare two complete datarows. In C# it is a simple matter
of if (datarow1 == datarow2) ....
But, if I try If DataRow1 = Datarow2 then.... I get an error stating
that the "operator '=' is not defined for type system.data.datarow.
Here is the full code:
Dim thisBindingSource As BindingSource = sender
|
by: Anil Gupte |
last post by:
How can I manipulate Datasets, such as getting a specific row based on a key
column value. Of course, I could loop through all the rows in the entire
dataset each time I needed something, but is there an easier way? I want to
be able to execute the equivalent of SQL statements including insert, delete
etc.
Any ideas? Thanx,
--
Anil Gupte
www.keeninc.net
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |