Results 1 to 2 of 2

Thread: dbSelectedItemMacro

  1. #1
    raymond chou Guest

    dbSelectedItemMacro

    I would like to know whether this is a way to pass the values from the selecteditemmacro to a session variable. Or how can I pass value from dbSelectItem to a session variable? Then I would like to use CDONT objects to send mails.

    Thanks

    Raymond.


  2. #2
    FK Guest

    dbSelectedItemMacro (reply)

    See whether the following helps ->

    Q51. In my application, I have a list of 100 items and I would like to allow user to visually select the record(s) via a checkbox and then export the field(s) of his/her choice within the record for further processing. Are there any provisions in ASPDB to accomplish that ?

    Pro has two new properties to make this kind of “shopping cart” type applications possible.

    1. dbSelectedItemMacro=”Fld string macro”
    Fld string macro=Export string with embedded field raw values.
    e.g. ”#1# #field2#“ would export field 1 and 2 separated by a space.

    2. dbSelectedItem(Optional delimiter As String)
    delimiter is the user preferred single character delimiter
    e.g. MyString=dbSelectedItem(chr(2))
    It is recommended that the single delimiter character should be a non-displayable character. If omitted, then chr(1) will be used.

    This special export is enabled ONLY if the dbSelectedItemMacro is not blank. Note that the regular Index “#” header is replaced by a “Select” button. Whenever a choice is made, the “Select” button must be clicked to submit the changes. Checking and unchecking the checkbox(s) are both considered as changes. Once the record is checked, the check will stick to the record even after a sort. One way to reset the checkboxes is to “Reload”. Checkout the get property X.dbSelectedItem.

    Example –

    <%
    Set X= Server.CreateObject(&#34;AspDB.Pro&#34
    1. X.dbUnit = 1
    2. X.dbMode=&#34;dual-horiz&#34;
    3. X.dbDSN = &#34;NWIND&#34;
    4. SQL=&#34;SELECT Customers.CustomerID, CompanyName, OrderID FROM Customers &#34;
    5. SQL=SQL & &#34;LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID &#34;
    6. SQL=SQL & &#34;ORDER BY OrderID&#34;
    7. X.dbSQL=SQL
    8. X.dbSelectedItemMacro=&#34;#0# #2#&#34;
    9. X.dbNavigationItem=&#34;top,bottom,prev,next&#34;
    10. X.aspdbPro
    11. response.write(&#34;MyString=&#34; & X.dbSelectedItem & &#34;<BR>&#34
    %>

    Warning: X.dbSelectedItemMacro stores markers in the session variable. Avoid marking long strings !!




    ------------
    raymond chou at 8/21/99 10:48:57 PM

    I would like to know whether this is a way to pass the values from the selecteditemmacro to a session variable. Or how can I pass value from dbSelectItem to a session variable? Then I would like to use CDONT objects to send mails.

    Thanks

    Raymond.


Posting Permissions

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