Data Grid Update

Jan 27 2005 11:34 AM
I am using Vb.net and when iam trying to update the table.... the change does not take place. 'On Form_Load Dim connection As New OracleClient.OracleConnection Dim command As New OracleClient.OracleCommand dim table as new datatable Dim sql As String sql = "SELECT * from DUMMY" 'set the connection connection = ' Connection String 'set command command.CommandText = sql 'Console.WriteLine(query) command.Connection = connection 'set dataadapter adapter.SelectCommand = command 'open connection connection.Open() 'fill table adapter.Fill(table) connection.Close() DataGrid1.DataSource = table ' The Save Button Code Dim cmd As OracleClient.OracleCommandBuilder cmd = New OracleClient.OracleCommandBuilder(adapter) dim x as integer x = adapter.update(table) ' X returns the no of rows changed ... but the table 'does get not updated table.acceptchanges() Waiting for help .....

Answers (11)