tommy

tommy

  • NA
  • 32
  • 0

Update Oracle from Datagridview

Feb 16 2009 1:03 AM

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.

Answers (1)