locked
How to fetch data from oracle and save in sql RRS feed

  • Question

  • User-576945844 posted

    i want to save records from oracle data to sql with timer with every 5 hours data should be fetch from oracle and save to sql,. there should be no duplication of ID number . 

    the data is huge around 100000 recrds in the table
     
    i am using this code for fetching data in text box 
     

    public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
     
            private void button1_Click(objectsender, EventArgs e)
            {

    SqlConnection con = new SqlConnection("Data Source=(local);Initial Catalog=Mreport;Integrated Security=True;");
    con.Open();
    SqlCommand sql = new SqlCommand("SELECT * FROM Transactions", con);
    SqlDataAdapter objDA = new SqlDataAdapter(sql);
    DataSet dsEmployee = new DataSet();
    objDA.Fill(dsEmployee, "dtEmployee");
    dataGridView1.DataSource = dsEmployee.Tables["dtEmployee"];

                 conn.Close();
            }
     
          
        }
    }

     

    Monday, December 10, 2012 4:36 PM

Answers

  • User3866881 posted

    Hello Abdul,

    Since you have so many records. To upload such a many record inside your table is almost impossible Because you need on-time update……as far as I see, I think you can:Use Windows Service instead of Web because this is an long period of time to do the certain task. So windows service is more suitable for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 12, 2012 6:43 AM

All replies