x _sanctus

x _sanctus

  • NA
  • 10
  • 0

Problem viewing updated database

Nov 6 2005 1:11 PM
Dear all, I create windows application using c# and i have problem using dataset. I create program to update database. The actual database content has updated. When i get the updated dataTable from the dataset to view the the current datatable content using the datatable default view, the content is still the old one. In order to view the content i use richtext & textbox, I dont want to use datagrid. How can i view the updated content without retrieve it from database again? Here is some of the code.. public DataTable getDataTable(string tableName){ return dataSet.Tables[tableName]; } private void refreshData(int id){ DataView temp=myDb.getUpdatedDataTable("tableName").DefaultView; temp.RowFilter="primary_key = "+id; ... //then fill the data form with updated value ... } //i change the getDataTable procedure but it still did't work public DataTable DataTable(string tableName){ if(dataSet.Tables[tableName].GetChanges()==null) return dataSet.Tables[tableName]; else return dataSet.Tables[tableName].GetChanges(); }