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. C#
  4. Visual Fox pro database to Sql Server

Visual Fox pro database to Sql Server

Scheduled Pinned Locked Moved C#
databasecsharpsql-servercomsysadmin
3 Posts 3 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
    Suj_78
    wrote on last edited by
    #1

    hi Guys, I am analysing the architecture for creating the following: To load data from Visual Fox pro table into Sql table through C# Com+. Steps I am after : 1. Create a method to read the data from Fox pro and convert it into an xml file. 2. Read the XML file and load into the table in Sql Server. But I do not know which namespace to use to read data from Fox pro database and generate the xml file. Can you guys please help??? Thanks Sujit

    happy coding!

    M A 2 Replies Last reply
    0
    • S Suj_78

      hi Guys, I am analysing the architecture for creating the following: To load data from Visual Fox pro table into Sql table through C# Com+. Steps I am after : 1. Create a method to read the data from Fox pro and convert it into an xml file. 2. Read the XML file and load into the table in Sql Server. But I do not know which namespace to use to read data from Fox pro database and generate the xml file. Can you guys please help??? Thanks Sujit

      happy coding!

      M Offline
      M Offline
      mikanu
      wrote on last edited by
      #2

      In order to access FoxPro databases you have to use the OleDB data access classes. If you are familiar with the SQLClient namespace, all you need is to basically replace SQL with Ole in whenever you use anything like: SQLDBConnection --> OleDbConnection. You do have to pay attention when you create the connection string for your database. The rest should be pretty straight forward if you have the odbc drivers installed properly for the fox pro database that you intend to use. Good luck!

      ---- www.digitalGetto.com

      1 Reply Last reply
      0
      • S Suj_78

        hi Guys, I am analysing the architecture for creating the following: To load data from Visual Fox pro table into Sql table through C# Com+. Steps I am after : 1. Create a method to read the data from Fox pro and convert it into an xml file. 2. Read the XML file and load into the table in Sql Server. But I do not know which namespace to use to read data from Fox pro database and generate the xml file. Can you guys please help??? Thanks Sujit

        happy coding!

        A Offline
        A Offline
        andyharman
        wrote on last edited by
        #3

        XML is not a very convenient intermediary data-format in this case. You would find it simpler to use SQL-Server's SSIS (or DTS if you are using SQL-Server 2000). That would allow you to copy data from FoxPro directly into a SQL-Server table. Otherwise MS-Access linked-tables should be able to do the trick. If you do need to copy the data programatically then use the .net ODBC or OLEDB classes to read FoxPro tables. You will then be able to link a DataReader object (from your FoxPro table) to an instance of the SqlBulkCopy[^] class to quickly copy data. Regards Andy

        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