Results 1 to 11 of 11

Thread: Edit drop list problems

  1. #1
    Bob Cummings Guest

    Edit drop list problems

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds="(;|)E_Rulcode||||SELECT RULCODE, Surname + N' ' + forename + N' ' + [Desc] + N' ' + Instcode FROM vwEMSStudents WHERE OWNORG= '" & criteria & "' ORDER BY SURNAME"

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  2. #2
    Frank Kwong Guest

    Edit drop list problems (reply)

    session(&#34;myCriteria&#34=Request.QueryString(&#34;criteria&#34

    will keep that all the time.

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & session(&#34;myCriteria&#34 & &#34;&#39; ORDER BY SURNAME&#34;


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  3. #3
    Bob Cummings Guest

    Edit drop list problems (reply)

    Thanks.

    As a result of trying this I appear to have found a bug. Try opening an edit page from a page with a link such as:
    ../Editpage.asp?param=&#34;test Param&#34;

    The Cancel button will not appear.

    if you have the startup property

    mydb.dbstartup=&#34;EditAdd&#34; set. Try it

    Bob Cummings


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  4. #4
    Bob Cummings Guest

    Edit drop list problems (reply)

    Thanks.

    As a result of trying this I appear to have found a bug. Try opening an edit page from a page with a link such as:
    ../Editpage.asp?param=&#34;test Param&#34;

    The Cancel button will not appear.

    if you have the startup property

    mydb.dbstartup=&#34;EditAdd&#34; set. Try it

    Bob Cummings


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  5. #5
    Frank Kwong Guest

    Edit drop list problems (reply)

    EditAdd is to allow user only to &#34;Add&#34; right from the beginning. User cannot see any display of data. Does it make sense ?

    ------------
    Bob Cummings at 9/13/01 8:24:22 AM

    Thanks.

    As a result of trying this I appear to have found a bug. Try opening an edit page from a page with a link such as:
    ../Editpage.asp?param=&#34;test Param&#34;

    The Cancel button will not appear.

    if you have the startup property

    mydb.dbstartup=&#34;EditAdd&#34; set. Try it

    Bob Cummings


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  6. #6
    Bob Cummings Guest

    Edit drop list problems (reply)


    Frank

    That may be so but the Cancel (which can, of course be changed to `View&#39 button allows users who want to, Edit/Delete records when first opening the Edit page - by displaying the grid with the pencil/scissors icons.

    If I don&#39;t pass the page parameters but use session variables instead, I get the effect I require. I just wondered why passing the param stopped the bitmap appearing.

    Bob

    ------------
    Frank Kwong at 9/13/01 10:43:57 AM

    EditAdd is to allow user only to &#34;Add&#34; right from the beginning. User cannot see any display of data. Does it make sense ?

    ------------
    Bob Cummings at 9/13/01 8:24:22 AM

    Thanks.

    As a result of trying this I appear to have found a bug. Try opening an edit page from a page with a link such as:
    ../Editpage.asp?param=&#34;test Param&#34;

    The Cancel button will not appear.

    if you have the startup property

    mydb.dbstartup=&#34;EditAdd&#34; set. Try it

    Bob Cummings


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  7. #7
    Frank Kwong Guest

    Edit drop list problems (reply)

    I cannot dup th eproblem. I use X.dbStartup=&#34;EditAdd&#34; and has no problem as teh Cancel button is still there .The following code is what I use. Modify it to break it -

    <%
    Set X= Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = &#34;3&#34;
    X.dbDSN = &#34;DSN=NWIND&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,FirstName,Title,City,Region,Co untry,&#34; &_
    &#34;HireDate,Left(HireDate,8) as Hired FROM Employees ORDER BY LastName&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbGridInc = &#34;5&#34;

    X.dbDBType = &#34;SQL&#34;
    X.dbOptions = &#34;NavGotoFldIndex=1&#34;
    X.dbExportFlds = &#34;LastName,HireDate,Hired&#34;
    X.dbNameMap = &#34;(;|)Hired|Hired||Left(HireDate,8)&#34; &#39; necessary for sorting to work

    X.dbGridTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;
    X.dbFormTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;

    X.dbEditFlds = &#34;(;,[])LastName, FirstName, Title, City, Region, Country, HireDate&#34;
    X.dbEditParams = &#34;(;,)TableName=Employees,BookMarkFlds=0,EditVa lidateName=PreventDel(),&#34; &_
    &#34;UpdateIcon=True,DeleteIcon=True,EditIconsLayo ut=Left&#34;
    X.dbStartup=&#34;EditAdd&#34;
    X.dbImageDir = &#34;/d/aspdb/images/&#34;
    X.dbNavigationItem = &#34;Top,Prev,Next,Bottom,Reload,Filter&#34;
    X.dbNavigationIcon = &#34;std&#34;

    X.ASPdb
    %>



    ------------
    Bob Cummings at 9/14/01 9:15:45 AM


    Frank

    That may be so but the Cancel (which can, of course be changed to `View&#39 button allows users who want to, Edit/Delete records when first opening the Edit page - by displaying the grid with the pencil/scissors icons.

    If I don&#39;t pass the page parameters but use session variables instead, I get the effect I require. I just wondered why passing the param stopped the bitmap appearing.

    Bob

    ------------
    Frank Kwong at 9/13/01 10:43:57 AM

    EditAdd is to allow user only to &#34;Add&#34; right from the beginning. User cannot see any display of data. Does it make sense ?

    ------------
    Bob Cummings at 9/13/01 8:24:22 AM

    Thanks.

    As a result of trying this I appear to have found a bug. Try opening an edit page from a page with a link such as:
    ../Editpage.asp?param=&#34;test Param&#34;

    The Cancel button will not appear.

    if you have the startup property

    mydb.dbstartup=&#34;EditAdd&#34; set. Try it

    Bob Cummings


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  8. #8
    Bob Cummings Guest

    Edit drop list problems (reply)


    Frank

    Rename the code you sent me to a page called &#34;AspdbTest2&#34;

    Create a new page using the following and call it &#34;AspdbTest1&#34;:


    <html>

    <head>
    <meta http-equiv=&#34;Content-Language&#34; content=&#34;en-gb&#34;>
    <meta name=&#34;GENERATOR&#34; content=&#34;Microsoft FrontPage 5.0&#34;>
    <meta name=&#34;ProgId&#34; content=&#34;FrontPage.Editor.Document&#34;>
    <meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-1252&#34;>
    <title>New Page 1</title>
    </head>

    <body>

    <p><a href=&#34;aspdbTest2.asp?Test1=&quot;This is test 1&quot;&#34;>Open Test Page</a></p>

    </body>

    </html>

    Double click the link and the CANCEL button will not appear!

    Bob

    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  9. #9
    Frank Kwong Guest

    Edit drop list problems (reply)

    this message have no code... I switched to another server, please send me the entire code to test.


    ------------
    Bob Cummings at 9/17/01 6:02:12 AM


    Frank

    Rename the code you sent me to a page called &#34;AspdbTest2&#34;

    Create a new page using the following and call it &#34;AspdbTest1&#34;:


    <html>

    <head>
    <meta http-equiv=&#34;Content-Language&#34; content=&#34;en-gb&#34;>
    <meta name=&#34;GENERATOR&#34; content=&#34;Microsoft FrontPage 5.0&#34;>
    <meta name=&#34;ProgId&#34; content=&#34;FrontPage.Editor.Document&#34;>
    <meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-1252&#34;>
    <title>New Page 1</title>
    </head>

    <body>

    <p><a href=&#34;aspdbTest2.asp?Test1=&#34;This is test 1&#34;&#34;>Open Test Page</a></p>

    </body>

    </html>

    Double click the link and the CANCEL button will not appear!

    Bob

    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  10. #10
    Bob Cummings Guest

    Edit drop list problems (reply)

    Frank

    Here is the complete code:

    Save this as aspdbtest1.asp:

    <html>

    <head>
    <meta http-equiv=&#34;Content-Language&#34; content=&#34;en-gb&#34;>
    <meta name=&#34;GENERATOR&#34; content=&#34;Microsoft FrontPage 5.0&#34;>
    <meta name=&#34;ProgId&#34; content=&#34;FrontPage.Editor.Document&#34;>
    <meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-1252&#34;>
    <title>New Page 1</title>
    </head>

    <body>

    <p><a href=&#34;aspdbTest2.asp?Test1=&#34;This is test 1&#34;&#34;>Open Test Page</a></p>

    </body>

    </html>

    Save text below as Aspdbtest2.asp:

    <%
    Set X= Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = &#34;3&#34;
    X.dbDSN = &#34;DSN=NWIND&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,FirstName,Title,City,Region,Co untry,&#34; &_
    &#34;HireDate,Left(HireDate,8) as Hired FROM Employees ORDER BY LastName&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbGridInc = &#34;5&#34;

    X.dbDBType = &#34;SQL&#34;
    X.dbOptions = &#34;NavGotoFldIndex=1&#34;
    X.dbExportFlds = &#34;LastName,HireDate,Hired&#34;
    X.dbNameMap = &#34;(;|)Hired|Hired||Left(HireDate,8)&#34; &#39; necessary for sorting to work

    X.dbGridTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;
    X.dbFormTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;

    X.dbEditFlds = &#34;(;,[])LastName, FirstName, Title, City, Region, Country, HireDate&#34;
    X.dbEditParams = &#34;(;,)TableName=Employees,BookMarkFlds=0,EditVa lidateName=PreventDel(),&#34; &_
    &#34;UpdateIcon=True,DeleteIcon=True,EditIconsLayo ut=Left&#34;
    X.dbStartup=&#34;EditAdd&#34;
    X.dbImageDir = &#34;/d/aspdb/images/&#34;
    X.dbNavigationItem = &#34;Top,Prev,Next,Bottom,Reload,Filter&#34;
    X.dbNavigationIcon = &#34;std&#34;

    X.ASPdb
    %>


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

  11. #11
    Frank Kwong Guest

    Edit drop list problems (reply)

    I saw the problem and corrected that. I&#39;llleave the cancel button on as it can be always turned to off by the &#39;none&#39;. send me your id file and I&#39;ll send you the proper test copy. It&#39;ll be released after some testing....


    ------------
    Bob Cummings at 9/18/01 6:42:40 AM

    Frank

    Here is the complete code:

    Save this as aspdbtest1.asp:

    <html>

    <head>
    <meta http-equiv=&#34;Content-Language&#34; content=&#34;en-gb&#34;>
    <meta name=&#34;GENERATOR&#34; content=&#34;Microsoft FrontPage 5.0&#34;>
    <meta name=&#34;ProgId&#34; content=&#34;FrontPage.Editor.Document&#34;>
    <meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-1252&#34;>
    <title>New Page 1</title>
    </head>

    <body>

    <p><a href=&#34;aspdbTest2.asp?Test1=&#34;This is test 1&#34;&#34;>Open Test Page</a></p>

    </body>

    </html>

    Save text below as Aspdbtest2.asp:

    <%
    Set X= Server.CreateObject(&#34;ASP.db&#34
    X.dbUnit = &#34;3&#34;
    X.dbDSN = &#34;DSN=NWIND&#34;
    X.dbSQL = &#34;SELECT EmployeeID,LastName,FirstName,Title,City,Region,Co untry,&#34; &_
    &#34;HireDate,Left(HireDate,8) as Hired FROM Employees ORDER BY LastName&#34;
    X.dbMode = &#34;Grid&#34;
    X.dbGridInc = &#34;5&#34;

    X.dbDBType = &#34;SQL&#34;
    X.dbOptions = &#34;NavGotoFldIndex=1&#34;
    X.dbExportFlds = &#34;LastName,HireDate,Hired&#34;
    X.dbNameMap = &#34;(;|)Hired|Hired||Left(HireDate,8)&#34; &#39; necessary for sorting to work

    X.dbGridTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;
    X.dbFormTableTag = &#34;Border=1 cellspacing=1 cellpadding=1&#34;

    X.dbEditFlds = &#34;(;,[])LastName, FirstName, Title, City, Region, Country, HireDate&#34;
    X.dbEditParams = &#34;(;,)TableName=Employees,BookMarkFlds=0,EditVa lidateName=PreventDel(),&#34; &_
    &#34;UpdateIcon=True,DeleteIcon=True,EditIconsLayo ut=Left&#34;
    X.dbStartup=&#34;EditAdd&#34;
    X.dbImageDir = &#34;/d/aspdb/images/&#34;
    X.dbNavigationItem = &#34;Top,Prev,Next,Bottom,Reload,Filter&#34;
    X.dbNavigationIcon = &#34;std&#34;

    X.ASPdb
    %>


    ------------
    Bob Cummings at 9/11/01 6:59:11 AM

    Hi

    I am creating an app where the user adds/edits to a table. After clicking ADDNEW the edit screen has the following drop down box to select students:

    Mydb.dbEditDropflds=&#34;(;|)E_Rulcode||||SELECT RULCODE, Surname + N&#39; &#39; + forename + N&#39; &#39; + [Desc] + N&#39; &#39; + Instcode FROM vwEMSStudents WHERE OWNORG= &#39;&#34; & criteria & &#34;&#39; ORDER BY SURNAME&#34;

    criteria is a variable passed to the page from the previous page:
    <%criteria=Request.QueryString(&#34;criteria&#34%>

    When the AddNew button is clicked, how can I maintain the value in `criteria&#39; so that the drop list will use it?

    Thanks

    Bob Cummings

Posting Permissions

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