|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help with deleting a Row in a databaseCan 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. 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 Show quoteHide quote "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. > > 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. "Newbie" <lapor***@charter.net> wrote in message There is something VERY wrong with a database application where this is news:1148044481.183966.7460@y43g2000cwc.googlegroups.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. possible. "Newbie" <lapor***@charter.net> wrote in message Is there a unique combination of fields?news:1147977604.736219.60050@i39g2000cwa.googlegroups.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.
Possible to set/reference a property 'dynamically'?
How to run scheduler for more than one time in a day network programming with vb Error that I can't figure out Parse String in Quotes as without Quotes Update ODBC DSN Properties in VB.NET Code? Download a file from a secured Https Server textbox currency free tutorials Localization VS 2005 - VB.net |
|||||||||||||||||||||||