This SELECT retrieves the stored PREFERENCE_TEXT for a single application/user combination, optionally scoped to a specific page name. It backs PreferenceData.GetPreferences.
Lower-cased user ID (userId.ToLower()); scopes the lookup to the requesting user.
:appname
Input
string (SqlHelper.NewParm)
40
Application name that owns the preference.
:pagename
Input
string (SqlHelper.NewParm)
40
Optional page name; only bound when pageName is non-empty (otherwise the whereNull clause AND PAGE_NAME IS NULL is used instead, with no bind variable).
-- Default form (no page name supplied)SelectUSER_ID,APP_NAME,PAGE_NAME,PREFERENCE_TEXTfromUSER_PREFERENCEwhereUSER_ID=:useridandAPP_NAME=:appnameandPAGE_NAMEisNULL
-- When pageName is supplied, the final predicate is replaced with:SelectUSER_ID,APP_NAME,PAGE_NAME,PREFERENCE_TEXTfromUSER_PREFERENCEwhereUSER_ID=:useridandAPP_NAME=:appnameandPAGE_NAME=:pagename