csharp_learner
asked on
Fill DataGridView into Oracle database C#
Hi,
My goal for this is to Update a Database table in Oracle with a DataGridView.
I have a datagridview1 containing the same column as the Oracle database.
I stuck @ how to fill the datatable with the DataGridView and Deleting everything from the current Oracle Database and insert the New DataTable.
My goal for this is to Update a Database table in Oracle with a DataGridView.
I have a datagridview1 containing the same column as the Oracle database.
I stuck @ how to fill the datatable with the DataGridView and Deleting everything from the current Oracle Database and insert the New DataTable.
OracleCommand oraclecmd = new OracleCommand("SELECT * FROM LOCATION", localConnection);
oracleda.SelectCommand = oraclecmd;
DataTable oracledt = new DataTable();
//Fill DataTable with datagridview1
oracleda.Fill(oracledt);
//Delete everything from existing data then insert
oracleda.Update(oracledt);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.