Reputation: 415
I have produced a small program that uses a database created in MS Access. I have created about 5 queries for the database to test it and everything is working fine. I want to learn something new, so I decided to improve my program by migrating DB to SQL Server, but I don't really know where to start from. I have installed MS SQL Server 2012 and looking for some tutorials/pointers for beginners. My initial goals are:
I believe that the up-size wizard included in MS Access can be sufficient for the job. Am I right?
I think that I should edit my connection string and replace OleDb with something else... What should it be?
Upvotes: 1
Views: 904
Reputation: 216293
I am not sure if the tool exists also for Sql Server 2012 but in 2008 R2 you have a menu entry in the Program Group for Sql Server called Data Import Export (32bit)
(Translated from my localization, hope to be near at the exact thing) that could be used to port an MS Access Database to a SQL Server. Of course you need install Sql Server Management Studio to manage the fine details of your new database.
For the code part (connection string) you could continue to use OleDb changing only the connection string (see here at www.connectionstrings.com), but your best option is to change everything and use the classes in the namespace System.Data.SqlClient
like SqlConnection instead of OleDbConnection, SqlCommand instead of OleDbCommand and so on....
Upvotes: 1