Got the solution ! (Edit: in fact not : see my post below)
It's the strored precedure AddPortalInfo that is not changed by the update. Here is the old procedure to be changed :
CREATE procedure dbo.AddPortalInfo
@PortalName nvarchar(128),
@Currency char(3),
@FirstName nvarchar(100),
@LastName nvarchar(100),
@Username nvarchar(100),
@Password nvarchar(50),
@Email nvarchar(100),
@ExpiryDate datetime,
@HostFee money,
@HostSpace int,
@SiteLogHistory int,
@HomeDirectory varchar(100)
as
DECLARE @PortalID int
insert into dbo.Portals (
PortalName,
ExpiryDate,
UserRegistration,
BannerAdvertising,
Currency,
HostFee,
HostSpace,
Description,
KeyWords,
SiteLogHistory,
HomeDirectory
)
values (
@PortalName,
@ExpiryDate,
0,
0,
@Currency,
@HostFee,
@HostSpace,
@PortalName,
@PortalName,
@SiteLogHistory,
@HomeDirectory
)
SET @PortalID = SCOPE_IDENTITY()
IF @HomeDirectory = ''
BEGIN
UPDATE dbo.Portals SET HomeDirectory = 'Portals/' + convert(varchar(10), @PortalID) WHERE PortalID = @PortalID
END
SELECT @PortalID
Here is the sql query to apply to make the correction :
ALTER PROCEDURE dbo.[AddPortalInfo]
@PortalName nvarchar(128),
@Currency char(3),
@ExpiryDate datetime,
@HostFee money,
@HostSpace int,
@SiteLogHistory int,
@HomeDirectory varchar(100)
as
DECLARE @PortalID int
insert into Portals (
PortalName,
ExpiryDate,
UserRegistration,
BannerAdvertising,
Currency,
HostFee,
HostSpace,
Description,
KeyWords,
SiteLogHistory,
HomeDirectory
)
values (
@PortalName,
@ExpiryDate,
0,
0,
@Currency,
@HostFee,
@HostSpace,
@PortalName,
@PortalName,
@SiteLogHistory,
@HomeDirectory
)
SET @PortalID = SCOPE_IDENTITY()
IF @HomeDirectory = ''
BEGIN
UPDATE Portals SET HomeDirectory = 'Portals/' + convert(varchar(10), @PortalID) WHERE PortalID = @PortalID
END
SELECT @PortalID
GO
I hope this might help someone else.
Regards,
Fabian