|
Sybernet / Supplied Procedures Reference
Release 3.00 Mar 03, 2005 |
|
This is one of three procedures for maintaining user preferences in Sybernet. Its primary purpose is to save user preferences for building the HTML body tag using SP_HTML_PREFERENCES. You can also use these procedures to temporarily (or permanently) store variables that may be shared between processes. These temporary variables, however, are user specific and persist until explicitly deleted with sp_delPreference. Two users logged into the same schema name share the same preference.
This procedure is used to retrieve a preference that was assigned when you called sp_putPreference.
Procedure sp_getPreference
(
@NAME VARCHAR(30)
, @VALUE VARCHAR(255) OUTPUT
, @PREFERENCE VARCHAR(255)
) ;
| Parameter | Description |
|---|---|
name |
The case-sensitive user preference that is to be retrieved. |
value |
The value corresponding to this preference. |
preference |
The value to return if no preference is defined. |
The following example illustrates how to create a user preference:
exec http.dbo.sp_putPreference 'FavoriteFood','Lasagne'
The following example illustrates how to retrieve a user preference:
declare
@favoriteFood varchar(255)
begin
exec http.dbo.sp_getPreference 'FavoriteFood',@FavoriteFood,'Pizza'
select 'Your favorite food is ' || @FavoriteFood
end
The following example illustrates how to delete a user preference:
exec http.dbo.sp_delPreference 'FavoriteFood'