How to create connection string for creating a new database
Posted on 2006-05-12
I'm using connection strings to SQL Server Express that have the form
"DataSource= .\SQLEXPRESS;AttachDbFilename="(path to my development directory)\CurrentDevelopmentDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
I'm assuming this works because the DB is already there, created "manually".
How might I build a connection string for a SQLCommand for a "Create DataBase" query?
I'm confused about what the AttachDbFileName would be, or if there would be another variable in its place, since there's no file yet.
Any guidance on this would be appreciated.