469,610 Members | 2,042 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

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 1313
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Fughal | last post: by
13 posts views Thread by Bob Darlington | last post: by
reply views Thread by edward_sanders | last post: by
5 posts views Thread by tabani | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.