Comments
3 comments
-
Thanks for your question. It's not something that we support directly, but the .NET Framework does have a SqlClient namespace that you can use to run queries. To do what you want to in your example, I think it's best to use a parameterized query as in this example: http://www.dotnetperls.com/sqlparameter
-
thanks for the link.. i figured it out.
I needed more single quotes... a LOT more.... and then it worked! -
Thanks, I'm glad that worked.
Add comment
Please sign in to leave a comment.
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE [@sitename + ''_APP_'' + @DBSUFFIX]
FROM DISK = @backupfilepath WITH MOVE DATAFILES TO @dbdirectory,
MOVE LOGFILES TO @tlogdirectory, REPLACE " '