[RESOLVED] Creating a database from sql server file in VS
I've got a SQL file from a previous database I exported from a SQL Server via SSMS. Now I want to create an mdf file from it in visual studio. I've tried running a sql query but it doesn't work as it's referencing the old sql server. How can I fix this please?
Re: Creating a database from sql server file in VS
Post the query that you're using to try to create this database.
Re: Creating a database from sql server file in VS
Thanks but I've sorted it by by following these steps:
1. remove the "USE database" statements at the start and end of the sql server generated query
2. create a mdf file by right clicking the app_code folder and choosing new item> sql server database in the solution explorer
3. double click the new database to show the database explorer window
4. right click on the database > new query
5. copy and paste the query in the open window and run it