简体   繁体   中英

How to migrate a DataBase created in Visual Studio C# to a SQL Server?

I want to transfer/connect my database that I created in Visual Studio C# to SQL Server Management Studio 2016. I'm developing Hotel Management Software and my database is relative short and I don't have the time to create a new one because of all the code included in my program related to the database. I only have one DataSet and three tables. I'm using Windows Authentication but I need to use SQL Server Authentication but I don't know to do that.

I'll appreciate all the answers to my question.

I figured out how to do it.

First was getting acess to my DataBase.mdf file, so I changed my program path to a "PUBLIC" folder. My was in the USERS and I changed it to C:/ path. Then in SQL Server Management, I entered with Windows Authentication first, then I went to "Databases" folder, right cliked, choose Attach, chosse Add, and I connected my Database.mdf in C:/ path. After connection, I went to Security, right clicked Login and added a new login. Now I can acess with SQL Server Authentication.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM