Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to insert one table data from one database to oher database

how to insert one table data from one database to oher database

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasetutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sophia Rekhi
    wrote on last edited by
    #1

    Hi all, i want to know that, How to insert one table records from one database to another table in other database using webservices in vb.net or C#. ex: databse name: PRS1 table name: sample1 | | databse name :PRS2 table name : sample2

    M 1 Reply Last reply
    0
    • S Sophia Rekhi

      Hi all, i want to know that, How to insert one table records from one database to another table in other database using webservices in vb.net or C#. ex: databse name: PRS1 table name: sample1 | | databse name :PRS2 table name : sample2

      M Offline
      M Offline
      Mayank Parmar
      wrote on last edited by
      #2

      I don't know why you want to use webservice. But easy way is to use Datatable to store Temporarily data. This can work if both databases are on same domain. I use free sqlhepler class to connect with database. ------------------------------------------------------------------------------ string sql="Select user_id,name from user_master"; DataTable dt = SqlHelper.ExecuteDatatable(SqlHelper.ConnectionStringfordatabase1, CommandType.Text, sql); foreach (DataRow dr in dt.Rows) { sql = "Inser into user_master (user_id,name) values('" + dr["user_id"] + "','" + dr["name"] + "')"; SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringfordatabase2, CommandType.Text, sql); } ------------------------------------------------------------------------------

      Regards, Mayank Parmar Senior Software Engineer Amba Tech Gandhinagar, India

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups