title: Running sql scripts against an attached database?
body: <p>I've got an MDF attached to an instance of Sql Server 2008 Express, and I need to run some sql scripts against it to generate tables, indexes, etc.</p>
  
  <p>But I can't figure out how to get this to work.  If I load the scripts in Visual Studio, it only allows me to connect to the server and run it against a database.  I can't choose a different provider (Microsoft Sql Server Database File), so I can't select my MDF.  </p>
  
  <p>This leaves me the only option of running the script as individual queries, but that won't work as it appears it doesn't support TSQL CREATE statements.</p>
  
  <p>How can I run my sql script against an attached database?</p>