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

Filtering RS using IN statement and cookie value

New Here ,
Oct 16, 2007 Oct 16, 2007
Scenario: Users of the site are to be presented with menu items that are relative to their customer group which I'm pulling from their customer details. User logs in, cookie is written to identify customer and menu categories.


I'm trying to filter a recordset that I'm using to display categories for the menu using an IN statement with the values being pulled from a string in a cookie that looks something like (1,2,4,7,9,11) (& i've also tried it formatted like ('1','2','4','7','9','11').

My cookie is written like ("keyuser") ("defaultmenu") where "defaultmenu" contains the string I'm trying to use for the IN statement

My SQL looks like this:

SELECT *
FROM dbo.CatGroups
WHERE catid IN (MMColParam)
ORDER BY ParentGroup ASC

Runtime value = request.cookies("keyuser") ("defaultmenu") - The value I'm pulling in looks like this ('1','2','4','7','9','11')
Type = Text


My recordset brings back absolutey nothing!!

Has anyone done anything like this with using an IN statement or should I consider something else. Spent an afternoon playing but getting nowhere slow!!

Any help appreciated.

cheers

Julian Parkinson
TOPICS
Server side applications
252
Translate
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 ,
Oct 16, 2007 Oct 16, 2007
LATEST
I just used <% =(RSCatGroups.Source) %> to display the sql - it looks like the token I'm using mmcolparam (where the ? is) doesn't quite work. Can anyone suggest the sytax for this?

SELECT * FROM dbo.CatGroups WHERE (catid IN (?))
Translate
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