?
Solved

Fill DataGridView into Oracle database C#

Posted on 2009-04-22
2
Medium Priority
?
2,199 Views
Last Modified: 2012-05-06
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.
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);

Open in new window

0
Comment
Question by:csharp_learner
1 Comment
 
LVL 48

Accepted Solution

by:
schwertner earned 2000 total points
ID: 24225249
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question