|
-
Mar 8th, 2013, 05:26 AM
#1
Thread Starter
Addicted Member
[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?
-
Mar 8th, 2013, 11:28 AM
#2
Re: Creating a database from sql server file in VS
Post the query that you're using to try to create this database.
-
Mar 8th, 2013, 05:53 PM
#3
Thread Starter
Addicted Member
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
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
|