SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Starting to-digg-in ********* jamesxv7's Avatar
    Join Date
    Oct 2003
    Location
    Island of Puerto Rico @ the Caribbean
    Posts
    873
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to copy a dataset to a Database

    Ok here is my problem. I fill a dataset with data from one table. I want to copy the data in the dataset to another table in the same database. I tried various way but I cant get it. How I can do it? Will stored procedures be a solution?
    James: Ecodig - My Blog - My Gallery
    Validate your sites: CSS - HTML/XHTML
    Without faith you are lost.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,270
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    instead of "filling a dataset" (i'm not sure i know what that even means), why not just insert the data from one table into the other?

    Code:
    insert
      into table2
         ( foo
         , bar
         , qux )
    select curly
         , larry * 9
         , moe / 37
      from table1
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He is talking about .NET.

    And no, I don't know how to do that, I avoid the dataset type like the plague.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •