Page 1 of 1

Syntax error on script with EXECUTE statement

Posted: Mon 20 Mar 2017 10:46
by vanmeir
Hi,

since the latest update of the SDAC components to version 7.3.15 I get errors on scripts containing EXECUTE statements.

I load text files into a TMSScript component and execute them.
Executing a script like
DECLARE @DBVersion [varchar] (128)
SELECT @DBVersion = [Value] FROM [dbo].[InternalParameter] WHERE [ParamName] = 'DBVersion'

IF @DBVersion = '2.6.170'
BEGIN
BEGIN TRANSACTION

EXECUTE sp_rename N'dbo.Tmp_Product', N'Product', 'OBJECT'

SELECT @DBVersion = '2.6.171'

UPDATE [dbo].[InternalParameter] SET [Value] = @DBVersion WHERE [ParamName] = 'DBVersion'
COMMIT
END
GO
leads to an exception 'Syntax error near TRANSACTION'.

I have tested over one hundred scripts and every script where I use the MS SQL Server EXECUTE statement fails and the exception text always refers to the line just before the EXCUTE statement. I use this method for over 11 years now and it was never a problem until my latest update.

Can this be fixed?

Re: Syntax error on script with EXECUTE statement

Posted: Mon 20 Mar 2017 11:55
by azyk
This bug was fixed in the latest SDAC 7.3.16 version. Please upgrade SDAC to 7.3.16 and inform us if the specified error is still reproduced.