Fill DataGridView into Oracle database C#

Posted on 2009-04-22
Last Modified: 2012-05-06
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


                       //Delete everything from existing data then insert


Open in new window

Question by:csharp_learner
    1 Comment
    LVL 47

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
    I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
    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 how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now