I am puzzled by the GetOnlineUsers() stored procedure. Looking at the 3 scripts in various versions (3.02.03, 4.00.04 and 4.03.04), It seems to have received and removed some 'show me less and specified field' optimalisation. Anybody a suggestion?
>> From 03.02.03 SqlDataProvider. -----------------------------------------------------------------
/* Add Get Online Users Stored Procedures */
/******************************************/
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}[GetOnlineUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}{objectQualifier}GetOnlineUsers
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}GetOnlineUsers @PortalID int
AS
SELECT
UO.UserID,
U.Username
FROM {objectQualifier}UsersOnline UO
INNER JOIN {objectQualifier}Users U ON UO.UserID = U.UserID
INNER JOIN {objectQualifier}UserPortals UP ON U.UserID = UP.UserId
WHERE UP.PortalID = @PortalID
GO
>> From 04.00.04 SqlDataProvider. -----------------------------------------------------------------
/* Add Get Online Users Stored Procedures */
/******************************************/
if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}GetOnlineUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}[{objectQualifier}GetOnlineUsers]
GO
CREATE PROCEDURE {databaseOwner}[{objectQualifier}GetOnlineUsers]
@PortalID int
AS
SELECT
UO.UserID,
U.Username
FROM {objectQualifier}UsersOnline UO
INNER JOIN {objectQualifier}Users U ON UO.UserID = U.UserID
INNER JOIN {objectQualifier}UserPortals UP ON U.UserID = UP.UserId
WHERE UP.PortalID = @PortalID
GO
>> From 04.03.04 SqlDataProvider. -----------------------------------------------------------------
/* Update GetPropertyDefinitionsByCategory */
/*******************************************/
IF EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'{databaseOwner}{objectQualifier}GetOnlineUsers') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE {databaseOwner}{objectQualifier}GetOnlineUsers
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}GetOnlineUsers
@PortalID int
AS
SELECT
*
FROM {objectQualifier}UsersOnline UO
INNER JOIN {objectQualifier}vw_Users U ON UO.UserID = U.UserID
INNER JOIN {objectQualifier}UserPortals UP ON U.UserID = UP.UserId
WHERE UP.PortalID = @PortalID
GO