OdbcDataAdapter query on update()..
-
Hello friends, Could somebody help me to solve the below issue. I am using odbcdataadapter in my application the select query for the adapter is something like this.. select * from employees where wages <5000 I display the records in an interface & let the user to edit it. When the user increases the salary of the employee above 5000.., I call the update function of the adapter class to update the dataset. the databse is updated correctly & the value in the dataset is also updated for the row. But my prob is, on updating I want the row to be removed from the dataset, since the where condition fails. But it doesn't happen in my case . Am I missing some important link.. else what is going wrong .. the where condition works fine only on the initial loading .. Thanks for the help in Advance
-
Hello friends, Could somebody help me to solve the below issue. I am using odbcdataadapter in my application the select query for the adapter is something like this.. select * from employees where wages <5000 I display the records in an interface & let the user to edit it. When the user increases the salary of the employee above 5000.., I call the update function of the adapter class to update the dataset. the databse is updated correctly & the value in the dataset is also updated for the row. But my prob is, on updating I want the row to be removed from the dataset, since the where condition fails. But it doesn't happen in my case . Am I missing some important link.. else what is going wrong .. the where condition works fine only on the initial loading .. Thanks for the help in Advance
It sounds like you're not using a DataGridView, otherwise the update would have been made to both the Datasource and the DataGridView. What are you using to display the records? Because if you're not using an Autobound Control then you will have to re-execute your Select Query to Fetch the updated records.
Live in fragments no longer. Only connect.