Bug in the Remove Schema Binding logic

alex.weatherallalex.weatherall Posts: 54
edited July 11, 2007 1:24PM in SQL Compare Previous Versions
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
TeleWare.com

Comments

  • Michelle TMichelle T Posts: 566 Gold 1
    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
    Software Developer
    Redgate Software
Sign In or Register to comment.