MS SQL Server Script Error
Posted: Sat Aug 28, 2021 7:33 pm
I recently upgraded from version X6 to X13 and am having a problem I can't resolve. I've recompiled and rebuild the project in the new version. Otherwise, I didn't make any material changes in the project but now when I ran a specific SQL script within the project I'm getting an unexplained error. All of my other SQL scripts are working fine.
So I'm running the plugin Microsoft SQL Server Script which starts with the following text:
The error I get returned in my SQLServerResult variable looks like this:
So the InstallAware variable, 'SQLDatabaseName,' is being loaded properly within the script but for some reason, when it tries to execute the script it doesn't recognize the DECLARE statement variables. Has anybody seen anything like this before? I've tried everything I can think of with no progress.
So I'm running the plugin Microsoft SQL Server Script which starts with the following text:
Code: Select all
DECLARE @name sysname, @datafile nvarchar(256), @logfile nvarchar(256), @cmd nvarchar(1000);
SET @name = N'$SQLDatabaseName$';
SET @datafile = N'$SQLServerDataFile$';
SET @logfile = N'$SQLServerLogFile$';
The error I get returned in my SQLServerResult variable looks like this:
Must declare the scalar variable "@name".DELINEATORSET @name = N'dbMASS Rocket'
So the InstallAware variable, 'SQLDatabaseName,' is being loaded properly within the script but for some reason, when it tries to execute the script it doesn't recognize the DECLARE statement variables. Has anybody seen anything like this before? I've tried everything I can think of with no progress.