Hello all,I'm building some script and I'm having problems making it inside a Transaction, I'll write here the first problem I have :) maybe I'll write the others when I fix this one ;)I got a cursor, that from it I build a string which I exec it afterwards, This is the code I use to execute every string I build, and I want to build it all in a transaction, so if one fails it rollbacks everything.I didnt write the way I build the cursor, because I know that part works ok for now (When it prints the string I see they are Ok)open collate_cursdeclare @TableName varchar (40), @ColName varchar (40), @Length int, @isnullable varchar (10), @xTypeName varchar(50), @idCol intfetch next from collate_curs into @TableName, @ColName, @Length, @isnullable, @xTypeName, @idColwhile (@@fetch_status = 0)BEGIN set @sSQLtbl = 'ALTER TABLE ' set @sSQLcol = ' ALTER COLUMN ' set @collate = ' COLLATE database_default set @sSQLtbl = 'ALTER TABLE ' +' ['+ @TableName+']' + @sSQLcol +@ColName+ ' '+ @xTypeName+ '('+ cast( @Length as varchar (5))+') ' + @collate + @isnullable print @sSQLtbl exec ( @sSQLtbl) fetch next from collate_curs into @TableName, @ColName, @Length, @isnullable, @xTypeName, @idColENDclose collate_cursdeallocate collate_cursEdited by - andydev on 05/26/2002 07:26:32