Hi Guys
Whilst the installation Wizard is running i get the following error:
"Must declare the variable @IsScalarFunction"
The Log shows me the following code
if exists (select * from dbo.sysusers where name='DPApps') begin declare @exec nvarchar(2000) declare @name varchar(150) declare @isscalarfunction int declare @istablefunction int declare sp_cursor cursor for select o.name as name, OBJECTPROPERTY(o.id, N'IsScalarFunction') as IsScalarFunction from dbo.sysobjects o where ( OBJECTPROPERTY(o.id, N'IsScalarFunction') = 1 OR OBJECTPROPERTY(o.id, N'IsTableFunction') = 1 ) and OBJECTPROPERTY(o.id, N'IsMSShipped') = 0 and o.name not like N'#%%' and (left(o.name,len('default_')) = 'default_' or left(o.name,7) = 'aspnet_') open sp_cursor fetch sp_cursor into @name, @isscalarfunction while @@fetch_status >= 0 begin if @IsScalarFunction = 1 begin select @exec = 'grant EXECUTE on ' + @name + ' to [DPApps]' execute (@exec) fetch sp_cursor into @name, @isscalarfunction end else begin select @exec = 'grant SELECT on ' + @name + ' to [DPApps]' execute (@exec) fetch sp_cursor into @name, @isscalarfunction end end deallocate sp_cursor end
What i expect the problem to be is the declaration of @isscalarfunction and the use of @IsScalarFunction in the script it is attemping to execute. Can someone point me to the base script so that i can make the correction myself or can someone tell me how to by pass the problem.
Kind Regards
Ettienne