Hi,
As my Subject title mentioned I'm trying to update an Oracle DB from the datagridview table.This is where I'm currently at now...
| //Establish Oracle DB connection. |
| int connectionCounter = 0; |
| bool boolUpdateData = true; |
| while (boolUpdateData && connectionCounter < 3) |
| { |
| try |
| { |
| localConnection = new OracleConnection(localFunction.localConnectionString); |
| localConnection.Open(); |
| boolUpdateData = false; |
| } |
| catch (Exception localException) |
| { |
| localFunction.WriteEventLog(localException.ToString(), "OPCAlarmConfig"); |
| } |
| connectionCounter++; |
| } |
| //??? |
| OleDbDataAdapter da = new OleDbDataAdapter(); |
| oleda.SelectCommand = cmd; |
| OleDbCommandBuilder cb = new OleDbCommandBuilder(da); |
| oleda.Fill(ds); |
| excelGridView.DataSource = ds.Tables[0]; |
| oleda.Update(ds); |
I'm not very sure how am I supposed point to the Oracle table I want to update.
Thanks in advance for any help or advice offered.
Vijaya KadiyalaPosted Feb 19, 2009, 11:35 AM
Hi
Are you getting any specific error while updating? or Update is not happening properly.
Thanks
Vijaya Kadiyala
Http://dotnetvj.blogspot.com