raj sir

raj sir

  • NA
  • 1
  • 0

how to save datatable from one database to another database table

Sep 16 2008 10:26 PM
Hi All,

I am kinda struggling to write code for saving datatable from one table to another table in another database, basically I am trying to write datacopy from one table to another table which is in different databse.

I have one tabel tblCountry in SQL databse with 2 coulumns, I need load the data into tblCOuntryExt in Oracle databse with 4 columns.
Now I need to map the columns and load the data.

                foreach( DataRow row in expDataTable.Rows)
                {
                    DataRow rw = impDataTable.NewRow();
                    rw["CountryName"] = row["CountryName"];
                    rw["ClientId"] = row["parmClient"];
                    impDataTable.Rows.Add(rw);
                }
              impDataTable.TableName = "tblCOuntryExt";
then I dont knwo what to do .......... I am stuck here...

Thanks a lot for any help here.