EStallworth
Well-known member
I have an application that receives partial payments (on an account) in order for the user to post a payment on that account within a database. It only receives account information from those who have not fully balanced their account. What I am having trouble with is deleting that row, of account information, from the table in which it is being pulled once a full payment has been made.
The way I have it set up now is for the app to load the whole table into a
dataset, find the specified row based on the primary key and remove it based on the same info, accept the changes and finally update the underlying DB. The problem is that it is not working and I believe that "remove" is dependent upon a certain position. Is there any other way to locate a certain row within a DB?¿ Thanks in advance for any help provided.
The way I have it set up now is for the app to load the whole table into a
dataset, find the specified row based on the primary key and remove it based on the same info, accept the changes and finally update the underlying DB. The problem is that it is not working and I believe that "remove" is dependent upon a certain position. Is there any other way to locate a certain row within a DB?¿ Thanks in advance for any help provided.
VB.NET:
[SIZE=2][COLOR=#0000ff]Try[/COLOR][/SIZE]
[SIZE=2]SqlDataAdapter3.Fill(DataSet111)[/SIZE]
[SIZE=2]DataSet111.PreReceivePayments.Rows.Find(ComboBox1.SelectedValue) [/SIZE]
[SIZE=2]DataSet111.PreReceivePayments.Rows.Remove(ComboBox1.SelectedValue) [/SIZE]
[SIZE=2]DataSet111.AcceptChanges() [/SIZE]
[SIZE=2]SqlDataAdapter3.Update(DataSet111)[/SIZE]
[SIZE=2][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]MessageBox.Show(ex.Message)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try [/COLOR][/SIZE]