M
mkidd
Hi,
I'm very new at this, guessing I'm missing something simple-- I have an
interface for a "Company" table that consists of a list box where the
Company names appear, then a few text boxes that show the rest of the
Company table info. Then I have "Add" "Update" and "Delete" buttons.
The "Add" and "Delete" Button commands work fine, but when I click on a
company in the list box and change any of its existing textbox fields,
then click "Update", the change is not written to the database (no
error message- nothing happens). BUT, if I make the change, click on
another company name in the list box, then back to the company that I
edited, THEN click Update, the info DOES update to the DB.
I set up an OleDbDataAdapter for the Company table using the Config
wizard. The SQL UPDATE command info that it generated looks ok. I can
post that info if it would help. I'm writing to a MS Access DB.
My Update Button command info is pretty straightforward:
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnUpdate.Click
Try
daCompany.Update(DsInSales1)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
I'll gladly add any info if it's needed. Thanks in advance.
Mike
I'm very new at this, guessing I'm missing something simple-- I have an
interface for a "Company" table that consists of a list box where the
Company names appear, then a few text boxes that show the rest of the
Company table info. Then I have "Add" "Update" and "Delete" buttons.
The "Add" and "Delete" Button commands work fine, but when I click on a
company in the list box and change any of its existing textbox fields,
then click "Update", the change is not written to the database (no
error message- nothing happens). BUT, if I make the change, click on
another company name in the list box, then back to the company that I
edited, THEN click Update, the info DOES update to the DB.
I set up an OleDbDataAdapter for the Company table using the Config
wizard. The SQL UPDATE command info that it generated looks ok. I can
post that info if it would help. I'm writing to a MS Access DB.
My Update Button command info is pretty straightforward:
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnUpdate.Click
Try
daCompany.Update(DsInSales1)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
I'll gladly add any info if it's needed. Thanks in advance.
Mike