Results 1 to 2 of 2

Thread: Problem: not showing all the rows

  1. #1
    Mattias Persson Guest

    Problem: not showing all the rows

    Hi!

    I am running a trialversion of aspdb-EP to see what it can do with it.

    I have tried to use two grids where one is depenting on the other. For example, if I choose one person in the upper grid, all the tests he has made should be visible in the rows in the second grid. My problem is that if the first person showing in the grid has made fewer test (in this example 2 tests) than the second one I click on, there will ONLY show the same amount of tests (rows)that the first person had. Even if it SHOULD show more. I have checked the sql statements but there seem to be something with the component that I can't figure out.

    When I click the filterbutton and "Apply filter" the page gets "resetted" and then it works fine. Can someone help me out here... Please.

    Wishes of a happy new year from Sweden to the rest of the world.


    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the ASP-db Object
    MyDb.dbUnit = 201 &#39;Make this a unique number for each page
    &#39;MyDb.dbMDB = Server.MapPath(&#34;asp-test.mdb&#34 &#39;Use this OR the next statment, not both
    MyDb.dbDSN = &#34;DSN=user;UID=SA;PW=&#34;
    MyDb.dbSQL = &#34;Select * from userprofile&#34; &#39;Put in your own SQL here

    MyDb.dbColor = &#34;4&#34; &#39;Choose color scheme 4 (blue/white)
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on grid borders, etc.
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on form borders, etc.
    MyDb.dbMode = &#34;Dual&#34; &#39;Show grid & form side by side
    MyDb.dbGridDisplayFlds = &#34;Username,Password,CompanyId, Firstname, Lastname&#34; &#39;Only show these 2 fields on the grid
    MyDb.dbFormDisplayFlds = &#34;Username,Password,CompanyId, Firstname, Lastname, Status&#34;
    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    MyDb.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter,add, update, edit, delete&#34;
    MyDb.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames
    MyDb.dbEditFlds=&#34;username, password, CompanyId, firstname, lastname, Status&#34;
    Mydb.dbDisplayLookUpList=&#34;(;|)CompanyID||SELEC T CompanyID, CompanyName FROM Companyprofile&#34;

    EDF = &#34;(;|)CompanyID||||SELECT CompanyID, CompanyName FROM Companyprofile&#34;
    Mydb.dbEditDropFlds = EDF


    &#39; Mydb.dbEditDropFlds = &#34;CompanyId,,companyprofile,companyid,,,NoBlank ,,Distinct&#34; &#39; Give a List of TITLES
    MyDb.dbFilterDropFlds = &#34;CompanyId,,companyprofile,companyname,,,NoBla nk,,Distinct&#34;
    MyDb.dbFldsNotes = &#34;CompanyId,(From a list in<BR>another Table);&#34;

    &#39;These properties are for the PRO version (in addition to the extra dbNavigationItems):

    MyDb.dbEditParams=&#34;TableName=userprofile,BookM arkFlds=userid,TableTag=BORDER=2&#34;
    &#39; MyDb.dbEditFlds=&#34;1,2,3,4,5&#34; &#39;Note: You CANNOT include the AutoNumbered UniqueID field!
    &#39;Note: You CANNOT include the AutoNumbered UniqueID field!
    MyDb.dbExportFlds = &#34;UserId&#34;


    MyDb.aspDBEP &#39;Display the data!

    &#39;response.write(&#34;<B> EXPORT (ASPdb_1012_ReqUserProfileId) = &#34; & Session(&#34;ASPdb_1212_ReqUserProfileId&#34 & &#34;</B><BR>&#34

    UserId = Session(&#34;ASPdb_201_UserId&#34
    &#39;Session(&#34;ReqUserId&#34= UserId
    &#39;response.write &#34;UserId= &#34;&UserId
    Set theDB2 = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the ASP-db Object

    Unit2 = 203
    theDB2.dbUnit = Unit2 &#39;Make this a unique number for each page
    &#39;theDB2.dbMDB = Server.MapPath(&#34;asp-test.mdb&#34 &#39;Use this OR the next statment, not both
    theDB2.dbDSN = &#34;DSN=Interv;UID=SA;PW=&#34;
    theDB2.dbSQL = &#34;SELECT Assessment.Name AS Name, Assessment.Code AS Code , UserAssessment.Score AS Score, UserAssessment.Max AS AMax, UserAssessment.DateCreated AS ADate FROM UserAssessment, Assessment WHERE &#34;&_
    &#34; UserAssessment.UserId = &#34;&UserId&&#34; AND &#34;&_
    &#34; UserAssessment.Assessment_Id = Assessment.Assessment_Id &#34;

    theDB2.dbColor = &#34;4&#34; &#39;Choose color scheme 4 (blue/white)
    theDB2.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on grid borders, etc.
    theDB2.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on form borders, etc.
    theDB2.dbMode = &#34;Dual&#34; &#39;Show grid & form side by side
    theDB2.dbGridDisplayFlds = &#34;Name, Code, Score, AMax, ADate&#34;
    theDB2.dbFormDisplayFlds = &#34;Name, Code, Score, AMax, aDate&#34;
    theDB2.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    &#39;theDB2.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter, download, add, update, edit, delete&#34;
    theDB2.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames
    theDB2.dbEditFlds=&#34;Name, Code, Score, AMax&#34;
    theDB2.dbEditParams=&#34;TableName=UserAssessment+ Assessment,BookMarkFlds=UserId,TableTag=BORDER=2&# 34;
    theDB2.dbGridInc = 50

    theDB2.dbNavigationItem = &#34;Prev,Next,Filter, Delete&#34;
    theDB2.aspDBEP


    %>


  2. #2
    Mark Guest

    Problem: not showing all the rows (reply)

    Mattias,

    Anytime you use a variable in a WHERE clause and that value changes, you MUST do a dbReset(nnn). Otherwise ASP-db won&#39;t re-count the records.

    See Programming Example D5a at http://www.aspdb.com
    That should fix your problem.

    Mark.
    P.S. &#34;Happy New Year&#34; to you, too!

    ------------
    Mattias Persson at 12/28/99 4:19:35 AM

    Hi!

    I am running a trialversion of aspdb-EP to see what it can do with it.

    I have tried to use two grids where one is depenting on the other. For example, if I choose one person in the upper grid, all the tests he has made should be visible in the rows in the second grid. My problem is that if the first person showing in the grid has made fewer test (in this example 2 tests) than the second one I click on, there will ONLY show the same amount of tests (rows)that the first person had. Even if it SHOULD show more. I have checked the sql statements but there seem to be something with the component that I can&#39;t figure out.

    When I click the filterbutton and &#34;Apply filter&#34; the page gets &#34;resetted&#34; and then it works fine. Can someone help me out here... Please.

    Wishes of a happy new year from Sweden to the rest of the world.


    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the ASP-db Object
    MyDb.dbUnit = 201 &#39;Make this a unique number for each page
    &#39;MyDb.dbMDB = Server.MapPath(&#34;asp-test.mdb&#34 &#39;Use this OR the next statment, not both
    MyDb.dbDSN = &#34;DSN=user;UID=SA;PW=&#34;
    MyDb.dbSQL = &#34;Select * from userprofile&#34; &#39;Put in your own SQL here

    MyDb.dbColor = &#34;4&#34; &#39;Choose color scheme 4 (blue/white)
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on grid borders, etc.
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on form borders, etc.
    MyDb.dbMode = &#34;Dual&#34; &#39;Show grid & form side by side
    MyDb.dbGridDisplayFlds = &#34;Username,Password,CompanyId, Firstname, Lastname&#34; &#39;Only show these 2 fields on the grid
    MyDb.dbFormDisplayFlds = &#34;Username,Password,CompanyId, Firstname, Lastname, Status&#34;
    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    MyDb.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter,add, update, edit, delete&#34;
    MyDb.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames
    MyDb.dbEditFlds=&#34;username, password, CompanyId, firstname, lastname, Status&#34;
    Mydb.dbDisplayLookUpList=&#34;(;|)CompanyID||SELEC T CompanyID, CompanyName FROM Companyprofile&#34;

    EDF = &#34;(;|)CompanyID||||SELECT CompanyID, CompanyName FROM Companyprofile&#34;
    Mydb.dbEditDropFlds = EDF


    &#39; Mydb.dbEditDropFlds = &#34;CompanyId,,companyprofile,companyid,,,NoBlank ,,Distinct&#34; &#39; Give a List of TITLES
    MyDb.dbFilterDropFlds = &#34;CompanyId,,companyprofile,companyname,,,NoBla nk,,Distinct&#34;
    MyDb.dbFldsNotes = &#34;CompanyId,(From a list in<BR>another Table);&#34;

    &#39;These properties are for the PRO version (in addition to the extra dbNavigationItems):

    MyDb.dbEditParams=&#34;TableName=userprofile,BookM arkFlds=userid,TableTag=BORDER=2&#34;
    &#39; MyDb.dbEditFlds=&#34;1,2,3,4,5&#34; &#39;Note: You CANNOT include the AutoNumbered UniqueID field!
    &#39;Note: You CANNOT include the AutoNumbered UniqueID field!
    MyDb.dbExportFlds = &#34;UserId&#34;


    MyDb.aspDBEP &#39;Display the data!

    &#39;response.write(&#34;<B> EXPORT (ASPdb_1012_ReqUserProfileId) = &#34; & Session(&#34;ASPdb_1212_ReqUserProfileId&#34 & &#34;</B><BR>&#34

    UserId = Session(&#34;ASPdb_201_UserId&#34
    &#39;Session(&#34;ReqUserId&#34= UserId
    &#39;response.write &#34;UserId= &#34;&UserId
    Set theDB2 = Server.CreateObject(&#34;AspDB.EP&#34 &#39;Create the ASP-db Object

    Unit2 = 203
    theDB2.dbUnit = Unit2 &#39;Make this a unique number for each page
    &#39;theDB2.dbMDB = Server.MapPath(&#34;asp-test.mdb&#34 &#39;Use this OR the next statment, not both
    theDB2.dbDSN = &#34;DSN=Interv;UID=SA;PW=&#34;
    theDB2.dbSQL = &#34;SELECT Assessment.Name AS Name, Assessment.Code AS Code , UserAssessment.Score AS Score, UserAssessment.Max AS AMax, UserAssessment.DateCreated AS ADate FROM UserAssessment, Assessment WHERE &#34;&_
    &#34; UserAssessment.UserId = &#34;&UserId&&#34; AND &#34;&_
    &#34; UserAssessment.Assessment_Id = Assessment.Assessment_Id &#34;

    theDB2.dbColor = &#34;4&#34; &#39;Choose color scheme 4 (blue/white)
    theDB2.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on grid borders, etc.
    theDB2.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on form borders, etc.
    theDB2.dbMode = &#34;Dual&#34; &#39;Show grid & form side by side
    theDB2.dbGridDisplayFlds = &#34;Name, Code, Score, AMax, ADate&#34;
    theDB2.dbFormDisplayFlds = &#34;Name, Code, Score, AMax, aDate&#34;
    theDB2.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    &#39;theDB2.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter, download, add, update, edit, delete&#34;
    theDB2.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames
    theDB2.dbEditFlds=&#34;Name, Code, Score, AMax&#34;
    theDB2.dbEditParams=&#34;TableName=UserAssessment+ Assessment,BookMarkFlds=UserId,TableTag=BORDER=2&# 34;
    theDB2.dbGridInc = 50

    theDB2.dbNavigationItem = &#34;Prev,Next,Filter, Delete&#34;
    theDB2.aspDBEP


    %>


Posting Permissions

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