How can we help you today? How can we help you today?

Bug in the Remove Schema Binding logic

Hi,

In SQL Compare 6 there is a bug in the remove schema binding logic if a function (or a view) has schema binding defined and a comment exists on the same line as the WITH SCHEMABINDIND clause.

e.g.
CREATE FUNCTION fn_Test (...
...
WITH SCHEMABINDING -- This comment will result in incorrect syntax.
AS
...

If SQL Compare decides it needs to drop the schema binding in it's synchronisation process then the SQL code it generates is incorrect. The ALTER FUNCTION statement leaves the WITH term in the definition which results in a syntax error.

e.g.
PRINT 'Dropping Schema Binding on function fn_Test'
...
ALTER FUNCTION fn_Test (...
...
WITH -- This comment will result in incorrect syntax.
AS 
...

Thanks

Alex
alex.weatherall
0

Comments

1 comment

  • Michelle T
    Thank you very much for reporting this!

    It's now in our bug tracking system and hopefully we'll get it fixed for 6.1.

    Sorry for the inconvenience,

    Michelle
    Michelle T
    0

Add comment

Please sign in to leave a comment.