Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2007, 10:01 AM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reading data from ms sql

Hi friends,
Can any one help me in, How can i read the data from MSSQl server (Let us say at x database and all tables in that database) and then convert data in to a text format and so that i can save and upload that data into MySql Data base.
I was following a procedure which is satisfactory for few tables but as the table number and size grows my procedure will become a tedious one.
Anyhow i will tell the procedure i am following
I created a DataIntegrationServices Project which is available in MSSQL2005 server Business Intelligence Development Studio.
There i created a dataflowtask where we can give the origin and destination files. Origin was a OLEDB connection to connect the database and destination was a FlatFile. In this way i can convert data from one table to the text format with delimiters we select.
But i need to convert some hundred tables, can any one help me in this regard.
I use C# language for developing my applications.
Can any one suggest me an alternative or enhance the same procedure by certain modifications.
Please don't suggest third party tools which i have to buy, i prefer working with code or free available tools.
Thank you in advance.
N.Raghavendran.

 
Old November 21st, 2007, 11:25 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Why not just use integration services and connect directly to MySql? You can connect to an OleDb data source which I'm sure you can do with mySql. Moving the data thru flat files seems to be a painfully unnecessary step.

-Peter
 
Old November 22nd, 2007, 03:30 AM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi planoie,
Thanks for ur reply.
But can u say how can i connect directly to mysql using oledb.
How can i establish the connection between MSSQL databse to Mysql databse and transfer the data (Source is MSSQL and Destination is MYsql database)
I have ODBC driver 3.5.1 and also mysql connector 5.0.8.1.
ALso i had downloaded a dll for Bulk Export Task from integration services u adviced.
Do u have any idea how can i implement that?
Thank you.


 
Old November 26th, 2007, 05:26 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You can either use the OLEDB for ODBC driver, or download a MySQL OLEDB driver (I think such a think exists).

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error reading data from excel to sql using ASP m_soni21 Classic ASP Professional 1 June 17th, 2008 12:40 AM
Import Data In MS SQL SERVER 2000 The Beginner Classic ASP Basics 1 August 14th, 2006 04:59 PM
Reading Data From SQL Ridouan VB.NET 2002/2003 Basics 2 January 31st, 2005 05:43 PM
Data Exporting from MS Access to SQL raghav_shenoy Access VBA 2 December 20th, 2004 03:22 PM
inserting utf-8 data using ado recordset to ms sql behrang79 Classic ASP Databases 0 September 29th, 2003 07:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.