Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-29 : 10:31:56
|
| Adam writes "I need to programmatically create a database in SQL Server 7. To do this I need to decide the filename at runtime. This means that I need to execute code like:CREATE DATABASE automailerON ( name = automailer_Data, filename = @dbfolder, size = 50 )LOG ON ( name = automailer_Log, filename = @logfolder, size = 10 )where @dbfolder and @logfolder are defined earlier. However, I get the following error message:Incorrect syntax near '@dbfolder'.I am guessing that I need to do something special to use a variable as the filename, but I don't know what!Thanks in advance." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
|
|
|