Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Default value for a recordset

New Here ,
Aug 21, 2006 Aug 21, 2006

Copy link to clipboard

Copied

I have a recordset that is determined by the results for a drop list. However, I would like for the recordset to first default to the value stored in the users table.

I set the drop list field to default to the users table defaultLang field but it only changes the field and not the recordset that is fed by the field.

USERS.DefaultLang

The List field is Lang

I currently have it set to
Select *
From StandardFields
Where MMColParam = LanguageID

MMColParam Request.Form("Lang")
TOPICS
Server side applications

Views

271
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

Im not sure I totaly follow your problem,

But i would query the database initially using a session var or defaults as you are doing if the users preferences were set, if they were set then id set the session Var to something out of their preferences and pull a recordset based on that, Or I would try and do it with a cookie and query from what it held about the user.

If your user has to sign up to join your database I would ask for the info in the application form so when it gets added you have the data to query with before they log in..

Hope thats on the right lines of your problem..
Regards
Tag

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

MY problem is that I want the recordset to default to the users preference, but also be allowed to be changed from the default value using a list drop list.

I have the user set a default language when establishing an account.

When the user opens a page it uses that language (spanish, engligh etc). I have a drop list of languages at the top of the page and would like for the same recordset that used the users preference to change to the selected language when the user uses the drop list.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2006 Aug 22, 2006

Copy link to clipboard

Copied

LATEST
Hi

What I would do there is, On the page opening I would do it with a session Var pulling a recordset, if the session var has no value then assign a default..

VB:
<%
Session("GetLanguage") =request.Form("lstlanguage")
if Session("GetLanguage") ="" then
Session("GetLanguage") ="English" ' or set to the users default in their preference
end if
%>


Then when the user uses your drop down list you have the options set the values to your session var on your recordset then submit the form with the listbox's on change something like

Set your forms action to the current page and it will reload for you.
VB:
onChange="this.form.submit();"

the recordset will take the new data from the session Var and it will pull your new data for you.
HTH

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines