|
-
April 28th, 2007, 01:59 PM
#1
SQL - where to start?
Hi
I need to write a program that reads the contains of MSSQL Database and copy the data to a MYSQL database. I have no idea where to start. How do I get access to a mysql and mssql database? Has anybody a good example for me? Is it maybe easier to use C# for this problem? If yes, is there anywhere a good HowTo?
best regards
Grit
-
April 28th, 2007, 02:15 PM
#2
Re: SQL - where to start?
Well. .. to start somewhere. . make sure you have a Visual Studio .
It doesn't matter what language you use. You can use C# or MFC or ...
Most of the databases can be accessed by ODBC. For accessing the data, you usually use SQL. So. . I guess it depends more on what you want to build instead of how.
-
April 28th, 2007, 02:35 PM
#3
Re: SQL - where to start?
I have the VC 2005 and I don't want to use ODBC. I downloaded the mysql API but there were no lib files or dll files but only header files. I have no idea how to use them without a lib or dll. I also need some howto for connecting to MS SQL Server. Is there a lib for that too?
I did write something similar already with PHP but in C++ it's a bit different because I don't know which class or function I need to use for it
Love
Grit
-
April 28th, 2007, 03:06 PM
#4
Re: SQL - where to start?
You have to use either the native drivers or the odbc drivers. There is no way to do it without them (from any practical sense).
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
April 28th, 2007, 03:20 PM
#5
Re: SQL - where to start?
Where do I get the native driver for MSSQL?
Grit
-
April 28th, 2007, 04:24 PM
#6
Re: SQL - where to start?
With SQLServer or with the .Net Runtime (for managed code only)
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
April 29th, 2007, 07:48 AM
#7
Re: SQL - where to start?
SQL Server will let you export data directly. Depending on your requirements, you may not need to write any code at all.
ODBC would be much, much easier than using any kind of native API.
-
April 29th, 2007, 07:49 AM
#8
Re: SQL - where to start?
Do you know where I could find a simple example how to connect to a MS SQL Server?
Grit
-
April 29th, 2007, 07:55 AM
#9
Re: SQL - where to start?
 Originally Posted by GCDEF
SQL Server will let you export data directly. Depending on your requirements, you may not need to write any code at all.
ODBC would be much, much easier than using any kind of native API.
Well I have a table in the MSSQL database. Once a day special columns of the table shall be copied to a MySQL database on a Linux Server.
The orginal base contains a table with FirstName, LastName, birthdate and some other things. Only the entire Firstnames and Lastnames shall be copied to the Linux MySql database each night. I thought it would be as easy as in PHP to connect to both database and do the copying. If there is a way to do that without writing a program I would be happy but I also would like to learn how to do this with a C++ or C# program
Grit
-
April 29th, 2007, 10:41 AM
#10
Re: SQL - where to start?
The easiest way I know programatically would be to use Class Wizard to create CRecordset derived classes for the source and destination databases. From there the code you'd need to write would be trivial. Read up on CRecordset.
I'm not a SQL admin type person, but that does seem like something you could do directly with SQL Server too.
-
April 29th, 2007, 04:46 PM
#11
Re: SQL - where to start?
Have a look at Ovidiu Cucu's article.
MySQl Wrapp
Please use code tags [code] [/code]
We would change the world, but God won't give us the sourcecode.. 
Undocumented futures are fun and useful....
_________
Gili
-
April 29th, 2007, 07:32 PM
#12
Re: SQL - where to start?
Is this a one-time MSSQL -> MySQL conversion or do you need this operation to run periodically (say once a day)?
-
April 29th, 2007, 08:04 PM
#13
Re: SQL - where to start?
Aejay,
You are slipping....look back at post #9
Once a day special columns of the table shall be copied to a MySQL database on a Linux Server.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
April 29th, 2007, 11:45 PM
#14
Re: SQL - where to start?
 Originally Posted by TheCPUWizard
Aejay,
You are slipping....look back at post #9

Oops, missed that. Anyway, you may want to consider running this as a service or at least provide logging to the event viewer to capture any errors that may occur.
-
April 30th, 2007, 04:14 AM
#15
Re: SQL - where to start?
 Originally Posted by g_gili
I saw this already but I get alot of errors when I use the VS 2005 for compiling :-(
I also don't know if this can connect to a MS SQL database too
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|