I try to run the following SQL statement to create a database:
string strSQL = "CREATE DATABASE " + strDatabaseName +
" ON PRIMARY " +
"(" +
"SIZE = 10MB, FILEGROWTH = 20%) " +
"LOG ON (" +
"SIZE = 5MB, " +
"FILEGROWTH = 20%)" +
" COLLATE SQL_Latin1_General_CP1_CI_AS;";
I want to use a default .mdf and .ldf file locations, but specify the size and file-growth parameters. The issue is that when I run it I get an error:
File option FILENAME is required in this CREATE/ALTER DATABASE statement.
So is there's any way to do what I'm trying to achieve?