Results 1 to 4 of 4

Thread: trouble with example 14

  1. #1
    Wayne Guest

    trouble with example 14

    Help!!!!
    I feel really stupid, but I can't understand the contents of example 14 and can't seem to get the thing to work.
    I think that I managed to export fields to session variables, but I really don't understand how to access the session vairiables correctly.
    the "ASPDB_n_Fieldname" is making my brain hurt. Specifically that is the dbUnit number??????? How do I know which one to use?
    Also can I put a field number into this thing instead of a field name???


  2. #2
    Kenneth Guest

    trouble with example 14 (reply)

    Wayne, this is an easy format to use:

    Field1=1
    Field2=CARS
    Field3=3
    Field4=BRAND
    -----------
    dbunit=1
    dbexportflds=0,1,2,3
    dbgriddisplayflds=-1
    -----------

    <% = session(aspdb_1_1) %>
    <% = session(aspdb_1_CARS) %>
    <% = session(aspdb_1_3) %>
    <% = session(aspdb_1_BRAND) %>

  3. #3
    wayne twitchell Guest

    trouble with example 14 (reply)

    On 1/26/99 3:07:30 PM, Kenneth wrote:
    > Wayne, this is an easy format to
    > use:
    I got that and thanks. however I can not seem to get the export to session variables to function correctly.
    here is some code for a plant database.
    -------------------------------------------
    sessionid = <%=session.sessionid%> <BR>
    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34 &#39; Create the ASP-db object
    DB=Server.MapPath(&#34;PHOTOS.mdb&#34 &#39; Point to the database file
    MyDb.dbQuickProps=&#34;14;&#34;& DB & &#34;;[plants];form;4,auto;std&#34; &#39;open the file
    MyDb.dbFormDisplayFlds=&#34;1,11,12,13,14,16,17&#3 4; &#39;Only show these fields
    MyDb.dbExportFlds = &#34;1,11,12,13,14,16,17&#34; &#39;Export them!
    MyDb.dbFormDisplayFlds = -1 &#39;Hide all the fields from displaying
    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to the &#34;images&#34; directory
    MyDb.dbStatusBar = false &#39;Turn off the status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these 2 buttons
    MyDb.ASPdbPro &#39;Display it!
    %>
    <p>Background information on this thing<% = Session(&#34;ASPdb_14_1&#34 %>
    <% = Session(&#34;ASPdb_14_12&#34 %><br>
    <img src=&#34;<% = Session(ASPdb_14_13) %>&#34;></p>

  4. #4
    John Guest

    trouble with example 14 (reply)

    Hi Wayne,

    Try replacing the field NUMBER with the field NAME when displaying the session variables. We export them by name. In our example A14a, you&#39;ll notice that we display:

    Session(&#34;ASPdb_14_FirstName&#34

    even though we simply export &#34;1,2,3,4...&#34;

    That should do it!

    John

    On 1/28/99 11:21:07 AM, wayne twitchell wrote:
    > On 1/26/99 3:07:30 PM, Kenneth wrote:
    > Wayne, this is an easy format to
    >
    > use:
    I got that and thanks. however I can not seem to get the export
    > to session variables to function correctly.
    here is some code for a plant
    > database.
    -------------------------------------------
    sessionid =
    > <%=session.sessionid%> <BR>
    <%
    Set MyDb =
    > Server.CreateObject(&#34;AspDB.Pro&#34 &#39; Create the ASP-db object
    >
    DB=Server.MapPath(&#34;PHOTOS.mdb&#34 &#39; Point to the database file
    >
    MyDb.dbQuickProps=&#34;14;&#34;& DB & &#34;;[plants];form;4,auto;std&#34;
    > &#39;open the file
    MyDb.dbFormDisplayFlds=&#34;1,11,12,13,14,16,17&#3 4;
    > &#39;Only show these fields
    MyDb.dbExportFlds =
    > &#34;1,11,12,13,14,16,17&#34; &#39;Export them!
    MyDb.dbFormDisplayFlds =
    > -1 &#39;Hide all the fields from
    > displaying
    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to the
    > &#34;images&#34; directory
    MyDb.dbStatusBar = false &#39;Turn off the
    > status bar
    MyDb.dbNavigationItem=&#34;prev,next&#34; &#39;Only show these
    > 2 buttons
    MyDb.ASPdbPro &#39;Display it!
    %>
    <p>Background information
    > on this thing<% = Session(&#34;ASPdb_14_1&#34 %>
    <% =
    > Session(&#34;ASPdb_14_12&#34 %><br>
    <img src=&#34;<% = Session(ASPdb_14_13) %>&#34;></p>

Posting Permissions

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