473,408 Members | 1,601 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Help with deleting a Row in a database

Can someone help:

Is there a way with ado.net and it's disconnected dataset to delete a
record in a table if you can't specify a unique field in an SQL WHERE
clause. The current Dbase .dbf table that I'm forced to work with does
not have any fields that I can count on as being unique. I know the
index of the row in my dataset table and I have no problem updateing
that dataset datatable, but I still need to update the database with
the delete or update etc.
Thanks
Dave.

May 18 '06 #1
4 1474
Dave,

Can you count on some combination of columns to uniquely identify a row? If
so, you can use that combination as a composite key to update or delete a
particular row.

Or are you saying that the table can have duplicate rows? In that case, I
don't know of a way to update or delete a particular row.

Kerry Moorman
"Newbie" wrote:
Can someone help:

Is there a way with ado.net and it's disconnected dataset to delete a
record in a table if you can't specify a unique field in an SQL WHERE
clause. The current Dbase .dbf table that I'm forced to work with does
not have any fields that I can count on as being unique. I know the
index of the row in my dataset table and I have no problem updateing
that dataset datatable, but I still need to update the database with
the delete or update etc.
Thanks
Dave.

May 18 '06 #2

"Newbie" <la******@charter.net> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.com...
Is there a way with ado.net and it's disconnected dataset to delete a
record in a table if you can't specify a unique field in an SQL WHERE
clause. The current Dbase .dbf table that I'm forced to work with does
not have any fields that I can count on as being unique.


Is there a unique combination of fields?
May 19 '06 #3
Kerry Moorman:

I appreciate the reply, I had examined the data and found that
there is strong possibility that there could be duplicate rows. That
being the case I had to call the original creator of the software and
find a field in the table that was unused. Once I found a blank field
I have inserted a key number that I can use to keep track of the
records.
What had me confused is a consultant had written a small little
application about 5 years ago using Visual Basic 6 and a datacontrol (
I believe it used ADO ). Anyway that application could delete these
duplicate records by using datacontrol.addnew datacontrol.delete etc.
The only thing I could determine is that because ADO wasn't
disconnected it always new the cursor location of the record and was
able to delete rows from the table even if there were duplicates!
The thing I wasn't sure of was if the dataset in ADO.Net had a way
to tell the database which records were updated/deleted. I know the
dataset keeps track of edits and last changes etc, I thought there
might have been some way to send that information to the actual
database table.
Dave.

May 19 '06 #4

"Newbie" <la******@charter.net> wrote in message
news:11********************@y43g2000cwc.googlegrou ps.com...
Kerry Moorman:

I appreciate the reply, I had examined the data and found that
there is strong possibility that there could be duplicate rows.


There is something VERY wrong with a database application where this is
possible.


May 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fughal | last post by:
Hi, I have a big DB2 database and I need this database without any Data in it for testing something. I have made a backup of these db and restore it on a testing system. My Problem is now how...
1
by: sparks | last post by:
At first I thought I could just delete the tables and import the tables. BUT my tables have relationships and I can not delete a table with relations. So that only deleted the non relational tables...
1
by: Coy Howe | last post by:
This one seems bizarre! We have a database consisting of a main table and 12 - 15 "sub" tables, which are connected via cascading relationships. The database performs many complex calculations...
13
by: Bob Darlington | last post by:
I have a repair and backup database routine which runs when a user closes down my application. It works fine in my development machine, but breaks on a client's at the following line: If...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
by: vadarv | last post by:
Hia! I'm a total amateur to VBS but need help on a VBS script. This is used in a HMI system from Siemens called WinCC, used for process viewing and control. What I need to is to write to a table...
0
by: edward_sanders | last post by:
Hi, This is a newbie question. I am using a text for learning php/mysql. I am using PHP 5.2.x and mysql 5. The example is that of a mysql database of jokes. Before we get to joins there is a...
5
by: NaziaAkter | last post by:
Hi EveryOne, I am having problem with deleting data form database after anyone have close the site. or any one have click the cancel button after entering data. I know the code for deleting data...
5
by: tabani | last post by:
I wrote the program and its not giving me correct answer can any one help me with that please and specify my mistake please it will be highly appreciable... The error arrives from option 'a' it asks...
4
by: sphinney | last post by:
I'm not exactly sure how to start this post. My question is pretty simple, but it will take a little bit of context before I can state it. (And thanks in advance for taking the time to read this!) ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.