[wix-users] Error in SqlString

Ven H venh.123 at gmail.com
Sun Apr 29 02:45:33 PDT 2018


One small correction. In the sql above, I forgot to mention the path.

*USE [master]*
*GO*

*/****** Object:  Database [myDB]    Script Date: DateAndTime******/*
*if db_id(' myDB ') is null*
* CREATE DATABASE [ myDB ]*
*  CONTAINMENT = NONE*
*  ON  PRIMARY *
* ( NAME = N' myDB _Data', FILENAME = N' [INSTALLDIR]\myDB _data.mdf' ,
SIZE = 1024MB , MAXSIZE = UNLIMITED, FILEGROWTH = 200MB )*
*  LOG ON *
* ( NAME = N' myDB _Log', FILENAME = N'  [INSTALLDIR]\myDB _log.ldf' , SIZE
= 1024MB , MAXSIZE = 2048GB , FILEGROWTH = 100MB )*
*GO*


Regards,
Venkatesh

On Sun, Apr 29, 2018 at 3:08 PM, Ven H <venh.123 at gmail.com> wrote:

> I have the following sql which I am trying to execute using an SqlString
> element. I am using SqlString and not SqlScript, because I have to pass
> some parameters for the data file and log file paths. I cannot use
> SqlFileSpec also because I will have multiple data files also.
>
> *USE [master]*
> *GO*
>
> */****** Object:  Database [myDB]    Script Date: DateAndTime******/*
> *if db_id(' myDB ') is null*
> * CREATE DATABASE [ myDB ]*
> * CONTAINMENT = NONE*
> * ON  PRIMARY *
> * ( NAME = N' myDB _Data', FILENAME = N' myDB _data.mdf' , SIZE = 1024MB ,
> MAXSIZE = UNLIMITED, FILEGROWTH = 200MB )*
> * LOG ON *
> * ( NAME = N' myDB _Log', FILENAME = N' myDB _log.ldf' , SIZE = 1024MB ,
> MAXSIZE = 2048GB , FILEGROWTH = 100MB )*
> *GO*
>
> I am not able to get it working. Initially, it complained about the GO
> keyword, but even if I remove, it keeps saying incorrect syntax near =. I
> tried enclosing the values within single quotes, but this also didn't work.
> Can anyone please help how to get this working. Also, I need to read the
> above from a file and dynamically assign it to the SQL property of the
> SqlString element. Please help.
>


More information about the wix-users mailing list