Problem filtering Data through Multiple Recordsets

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Problem filtering Data through Multiple Recordsets

    Hello, I am currently working on a profile page that users will go to once they
    log in to our website. The profile page will show the users contact
    information, as well as show any additional items that are relavent to the user
    like outstanding orders, missing documents etc... How I have this set up is,
    there is a table in the database that has all the user's info like name, pass,
    address, etc.. They login to the site and it validates it baised off that
    table. Then when they click on the profile link it takes them to the 'Profile'
    page. Once they enter the the profile page I can get the recordset to filter
    based off of MM_Username and so that recordset loads just fine. But in the
    second, and third section I want to be able to show the records off a second
    and third recordset. Now in each table I have a field called salesrepcode that
    I would like to use to tie all off the records together. So Ideally the page
    will show just the records associated to that user. Can anyone help me figure
    out how I can filter the second and third recordsets? Thanks in advance!
    Section#1 Welcome User - Recordset#1 - Table Users
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
    ::::::::::::: Section#2 Users Information, Address, phone, etc... Recordset#1 -
    Table Users
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
    ::::::::::::: Section#3 Order History - Recordset#2 - Table SalesRecords
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
    ::::::::::::: Section#4 Missing Paperwork - Recordset#3 - Table MissingDocs
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
    :::::::::::::

    Jester_boy Guest

  2. Similar Questions and Discussions

    1. Multiple Recordsets
      OK, I know there has to be a better way to do this, hopefully someone can shed some light on this subject. Using SQLServer 2000 and VBscript...
    2. problem with filtering data
      Hello, I have a simple table containing adresses. A sample view of the table is id name city -------------------------------- 100 ...
    3. Multiple recordsets?
      Hey all I'm not sure if there's anything that can be done about this or not. I'm displaying the contents of two different tables (using Access for...
    4. Getting Multiple Recordsets from an SP
      I am using ASP 3.0/ADO to call an SP. The SP has multiple SELECT statements so I need to get the multiple return sets but I cannot find the right...
    5. Should open multiple recordsets, or just one?
      Hi, I find myself once again returning to a problem project I have been so far unable to finish... I have a table of teaching session data and...
  3. #2

    Default Re: Problem filtering Data through Multiple Recordsets

    I would assume that the User ID is also in the other tables. If this is so
    then just apply whatever filter you have in the first to the other
    recordsets.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Jester_boy" <webforumsuser@macromedia.com> wrote in message
    news:d0l8lv$mei$1@forums.macromedia.com...
    > Hello, I am currently working on a profile page that users will go to once
    they
    > log in to our website. The profile page will show the users contact
    > information, as well as show any additional items that are relavent to the
    user
    > like outstanding orders, missing documents etc... How I have this set up
    is,
    > there is a table in the database that has all the user's info like name,
    pass,
    > address, etc.. They login to the site and it validates it baised off that
    > table. Then when they click on the profile link it takes them to the
    'Profile'
    > page. Once they enter the the profile page I can get the recordset to
    filter
    > based off of MM_Username and so that recordset loads just fine. But in the
    > second, and third section I want to be able to show the records off a
    second
    > and third recordset. Now in each table I have a field called salesrepcode
    that
    > I would like to use to tie all off the records together. So Ideally the
    page
    > will show just the records associated to that user. Can anyone help me
    figure
    > out how I can filter the second and third recordsets? Thanks in advance!
    > Section#1 Welcome User - Recordset#1 - Table Users
    >
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ::::
    > ::::::::::::: Section#2 Users Information, Address, phone, etc...
    Recordset#1 -
    > Table Users
    >
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ::::
    > ::::::::::::: Section#3 Order History - Recordset#2 - Table SalesRecords
    >
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ::::
    > ::::::::::::: Section#4 Missing Paperwork - Recordset#3 - Table
    MissingDocs
    >
    :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::
    ::::
    > :::::::::::::
    >

    Paul Whitham TMM Guest

  4. #3

    Default Re: Problem filtering Data through Multiple Recordsets

    Actually the user id is only in the first table the session validates and
    authenticates against the userid and password. I am using salesrepcode to be
    constant with all of the tables. I guess I could have them log on with
    salesrepcode, but ideally I would like to keep that reserved so if I have to
    change usernames etc I can. So I am trying to Login(session) - go to index -
    then profile sheet where the employee table will show user details (employees
    table) and below it I

    Jester_boy Guest

  5. #4

    Default Re: Problem filtering Data through Multiple Recordsets

    Okay that is not that difficult, assuming that in your login table you are
    also storing the salesrepcode.

    If you have a look at the code on the login user script generates you will
    find that the session variable is set inside of an IF statement, that is
    based on the recordset containing items. Simple create a second session
    variable and assign the salesrepcode to it like this

    session("svSaleRep") = recordset.fields.Item("salesrepcode").value

    Then you can use this second session variable to filter the other recordsets

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Jester_boy" <webforumsuser@macromedia.com> wrote in message
    news:d0lcrb$sip$1@forums.macromedia.com...
    > Actually the user id is only in the first table the session validates and
    > authenticates against the userid and password. I am using salesrepcode to
    be
    > constant with all of the tables. I guess I could have them log on with
    > salesrepcode, but ideally I would like to keep that reserved so if I have
    to
    > change usernames etc I can. So I am trying to Login(session) - go to
    index -
    > then profile sheet where the employee table will show user details
    (employees
    > table) and below it I
    >

    Paul Whitham TMM Guest

  6. #5

    Default Re: Problem filtering Data through Multiple Recordsets

    Paul, Thanks for the reply. I am not 100% on what you mean. Here is the code I
    am using for validating the login. It appears to use a couple IF statements.
    <% // *** Restrict Access To Page: Grant or deny access to this page var
    MM_authorizedUsers='1,2,3,4,5,6,7,8'; var MM_authFailedURL='../login.asp'; var
    MM_grantAccess=false; if (String(Session('MM_Username')) != 'undefined') { if
    (false || (String(Session('MM_UserAuthorization'))=='') ||
    (MM_authorizedUsers.indexOf(String(Session('MM_Use rAuthorization'))) >=0)) {
    MM_grantAccess = true; } } if (!MM_grantAccess) { var MM_qsChar = '?';
    if (MM_authFailedURL.indexOf('?') >= 0) MM_qsChar = '&amp;'; var MM_referrer
    = Request.ServerVariables('URL'); if (String(Request.QueryString()).length >
    0) MM_referrer = MM_referrer + '?' + String(Request.QueryString());
    MM_authFailedURL = MM_authFailedURL + MM_qsChar + 'accessdenied=' +
    Server.URLEncode(MM_referrer); Response.Redirect(MM_authFailedURL); } %>

    Jester_boy Guest

  7. #6

    Default Re: Problem filtering Data through Multiple Recordsets

    I think we are headed on the right path of the second session variable can
    anyone help me with creating it? Can I do it in Dreamweaver or is it only via
    the code that it can be done? Any help would be greatly appreciated. Thanks,
    Jester

    Jester_boy Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139