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. General Programming
  3. Visual Basic
  4. How to:Transfer Table to Text?

How to:Transfer Table to Text?

Scheduled Pinned Locked Moved Visual Basic
databasesql-serversysadminhelptutorial
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
    shank_prasad
    wrote on last edited by
    #1

    Hi, I want to copy a Table (in sql server) to a specified Text File programmatically using DTS.Can any one help me?If possible can u please paste the code? Thanks in advance

    T 1 Reply Last reply
    0
    • S shank_prasad

      Hi, I want to copy a Table (in sql server) to a specified Text File programmatically using DTS.Can any one help me?If possible can u please paste the code? Thanks in advance

      T Offline
      T Offline
      Tim McCurdy
      wrote on last edited by
      #2

      You can do this one of three ways. 1.) The best way is to use an ADO Recordset / ADO.NET DataSet and use the "Save" / "WriteXML" Methods. This is best because both the Recordset and DataSet can open an XML file. 2.) Use BCP to Bulk Export data from the Table to a Text File. This is essentially what the DTS does. 3.) There is also a way to Bulk export using an XML format but I can't remember the command. Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.

      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