PRoblems Deleting and Uodating Records with Access
I Am using a prgram to udate and control a small database for my company. I have the code written and working, however my database will not take certian updates. The odd thing is certian lines of code will add in rows to the database where as others will not. At the same time I am having no sucess in deleting a line from the databse. I can delete the line from the Data Source but the change will not transfer.
This is the code that adds a record to the table and updates the data properly.
MyDS.Clear()
myAdapt.Fill(MyDS)
. . . code to get new data . . .
myRow = myTable.NewRow()
myRow("Buildings") = newbuilding
MyDS.Building_List.ImportRow(myRow)
myAdapt.Update(MyDS)
Where as on the same form to remove a record this code is used . . .
MyDS.Clear()
myAdapt.Fill(MyDS)
myRow = MyDS.Building_List.Rows.Item(V)
MyDS.Building_List.Rows.Remove(myRow)
myAdapt.Update(MyDS)
this code will remove the Row from the DS , but the code will not make the change to the database itself. The code gives me no syntatical errors so I assume the problem is in my logic. IF anymore data is needed to help me with this please let me know. The probleem is that the changes will not carry over. I have a similar problem on another form in the same program.