Data Grid Update
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 .....

mikerRank #2,843 · 502 reputationPosted Jan 27, 2005, 6:58 AM EST
vishalsethia32 reputationPosted Jan 27, 2005, 7:11 AM EST
mikerRank #2,843 · 502 reputationPosted Jan 27, 2005, 7:21 AM EST
vishalsethia32 reputationPosted Jan 27, 2005, 7:32 AM EST
mikerRank #2,843 · 502 reputationPosted Jan 27, 2005, 7:43 AM EST
vishalsethia32 reputationPosted Jan 28, 2005, 5:22 AM EST
vishalsethia32 reputationPosted Jan 28, 2005, 5:45 AM EST
mikerRank #2,843 · 502 reputationPosted Jan 28, 2005, 8:50 AM EST
vishalsethia32 reputationPosted Jan 28, 2005, 12:17 PM EST
shimtannyRank #3,312 · 434 reputationPosted Jan 31, 2005, 1:32 AM EST
vishalsethia32 reputationPosted Jan 31, 2005, 6:56 AM EST