VS2017 using SQL localdb problem two
To the blog Park is not short, always ask for the person. Recently used VS2017, encountered some problems, in the solution always can not find a solution to be able to use, in the multi-party search, self-exploration, finally a successful solution, recorded here, I hope to be useful to everyone.
Problem one: VS2017 using the old version MDF data file can not be imported correctly when using VS2017, you need to import some MDF files, such as the Microsoft Northwind, the system will be prompted when the import: After clicking the upgrade, it will appear
If you install the full version of SQL, it is very good (I did not install, and did not try, it should be easier to upgrade). At the same time, the full version of SQL can also execute the corresponding SQL query to create an example database. So how do you use a file with a suffix of SQL in LocalDB to create a database? The steps are as follows: 1. In SQL Server Object Explorer, select the database folder (the gray Line), right-click, select Create a new database, and in the popup dialog box, enter the name of the database you wish to create, such as test.
2. Right-click on the newly created database and select New query. Next VS2017 will automatically set up a query window, you just need to create a database to open the SQL file, the contents of the inside copy, point execution, set up a database. Issue 2: Database created with this method is garbled when querying Chinese this problem occurs because LocalDB default language ordering is different, follow these steps: Right-click on the database folder, select New query, use the following statement in the query: CREATE database Test2collate Chinese_prc_ci_as, you can set up the corresponding database. At this point, the database on the query, the New Query window to enter the corresponding SQL statement can be completed database operation, and Chinese query can become normal. The writing is a bit messy, we forgive.
VS2017 using SQL localdb problem two