Results 1 to 3 of 3

Thread: Error in exported session variable.

  1. #1
    Ralph Asbury Guest

    Error in exported session variable.

    The problem that I am having is the Tier field (exported variable) displayed on the page does not automatically update after the first time it is displayed (HTML target frame for this page is _blank). The db.Reset function doesn&#39;t seem to be working. I&#39;ve tried adding <% response.buffer=true %> so that the page doesn&#39;t display until after it is done running the program and also added the meta tag to prevent cacheing of the page but this doesn&#39;t help. After the page is done loading, I can click Refresh on the browser and the correct Tier will display. The ASP code is split because there is a need to display the session variable before the grid is displayed.

    <% response.buffer=true %>
    <HTML>

    <HEAD>

    <TITLE>Central Office Report</TITLE>
    <META HTTP-EQUIV=&#34;Pragma&#34; CONTENT=&#34;no-cache&#34;>
    </HEAD>

    <BODY>

    <%
    Set N = Server.CreateObject(&#34;ASP.db&#34
    N.dbMDB = Server.MapPath(&#34;SERF.mdb&#34
    N.dbUnit = 14

    W=Request(&#34;OE_NAME&#34 &#39; Get what the user type in during the sql1 program

    if (W <> &#34;&#34 then &#39; Is this the first time in? If so, set the session
    Session(&#34;SesOE_NAME&#34 = W &#39; variable so the user&#39;s entry will be remembered.
    N.dbReset(14) &#39; new parameters just came in.

    LOCALSQL = Session(&#34;SesOE_NAME&#34&#39; + &#34;%&#34;

    sq = &#34;SELECT OE_NAME, CO_NAME AS [Central Office], Tier, Colocation AS [Colocation/MSA], [CoLo Construction Complete] AS [Construction Schedule] FROM [Central Offices] WHERE (((OE_NAME)=&#39;&#34;
    sq = sq & LOCALSQL
    sq = sq & &#34;&#39)&#34;
    sq = sq & &#34; ORDER BY [CO_NAME]&#34;
    N.dbSQL = sq

    end if
    %>

    <P align=&#34;center&#34;><IMG border=&#34;0&#34; src=&#34;../images/cntrl_offc.gif&#34;>

    <BR>
    <FONT face=&#34;Arial&#34; size=&#34;4&#34;>for <B><%=Session(&#34;SesOE_NAME&#34%></B> (<%=Session(&#34;ASPdb_14_Tier&#34%>)</FONT>
    <p>

    <%
    N.dbExportFlds = &#34;0,2&#34;

    N.dbColor = &#34;white, 000066, #FFCC00, black, #EEEEEE&#34;

    N.dbMode = &#34;Grid&#34;
    N.dbNavigation = &#34;None&#34;
    N.dbStatusBar = &#34;False&#34;
    N.dbGridInc = &#34;600&#34;
    N.dbGridColSort = False
    N.dbGridHideFlds = &#34;0,2&#34;
    N.dbGridTableTag = &#34;CellPadding=2 width=650&#34;
    N.dbNameMap = &#34;Construction Schedule,Construction Schedule<FONT color=red>*</FONT>&#34;
    N.dbMagicCell = &#34;Colocation/MSA,align=center;Construction Schedule,align=center&#34;
    N.dbOptions = &#34;CellFontTag=Face=Arial Size=2&#34;
    N.ASPdb
    %>

    <p>

    <FONT color=&#34;#FF0000&#34; face=&#34;Arial&#34; size=&#34;2&#34;>*</FONT>

    <FONT face=&#34;Arial&#34; size=&#34;1&#34;> Colocation construction ONLY - &#34;Complete&#34; does not mean service readiness. Conduct a location search for product availability information.</FONT>
    </BODY>

    </HTML>

  2. #2
    Mark Guest

    Error in exported session variable. (reply)

    Ralph,
    I think you have a bug in your code. dbSQL will be undefined most of the time!
    Mark.


    ------------
    Ralph Asbury at 1/3/01 12:30:42 PM

    The problem that I am having is the Tier field (exported variable) displayed on the page does not automatically update after the first time it is displayed (HTML target frame for this page is _blank). The db.Reset function doesn&#39;t seem to be working. I&#39;ve tried adding <% response.buffer=true %> so that the page doesn&#39;t display until after it is done running the program and also added the meta tag to prevent cacheing of the page but this doesn&#39;t help. After the page is done loading, I can click Refresh on the browser and the correct Tier will display. The ASP code is split because there is a need to display the session variable before the grid is displayed.

    <% response.buffer=true %>
    <HTML>

    <HEAD>

    <TITLE>Central Office Report</TITLE>
    <META HTTP-EQUIV=&#34;Pragma&#34; CONTENT=&#34;no-cache&#34;>
    </HEAD>

    <BODY>

    <%
    Set N = Server.CreateObject(&#34;ASP.db&#34
    N.dbMDB = Server.MapPath(&#34;SERF.mdb&#34
    N.dbUnit = 14

    W=Request(&#34;OE_NAME&#34 &#39; Get what the user type in during the sql1 program

    if (W <> &#34;&#34 then &#39; Is this the first time in? If so, set the session
    Session(&#34;SesOE_NAME&#34 = W &#39; variable so the user&#39;s entry will be remembered.
    N.dbReset(14) &#39; new parameters just came in.

    LOCALSQL = Session(&#34;SesOE_NAME&#34&#39; + &#34;%&#34;

    sq = &#34;SELECT OE_NAME, CO_NAME AS [Central Office], Tier, Colocation AS [Colocation/MSA], [CoLo Construction Complete] AS [Construction Schedule] FROM [Central Offices] WHERE (((OE_NAME)=&#39;&#34;
    sq = sq & LOCALSQL
    sq = sq & &#34;&#39)&#34;
    sq = sq & &#34; ORDER BY [CO_NAME]&#34;
    N.dbSQL = sq

    end if
    %>

    <P align=&#34;center&#34;><IMG border=&#34;0&#34; src=&#34;../images/cntrl_offc.gif&#34;>

    <BR>
    <FONT face=&#34;Arial&#34; size=&#34;4&#34;>for <B><%=Session(&#34;SesOE_NAME&#34%></B> (<%=Session(&#34;ASPdb_14_Tier&#34%>)</FONT>
    <p>

    <%
    N.dbExportFlds = &#34;0,2&#34;

    N.dbColor = &#34;white, 000066, #FFCC00, black, #EEEEEE&#34;

    N.dbMode = &#34;Grid&#34;
    N.dbNavigation = &#34;None&#34;
    N.dbStatusBar = &#34;False&#34;
    N.dbGridInc = &#34;600&#34;
    N.dbGridColSort = False
    N.dbGridHideFlds = &#34;0,2&#34;
    N.dbGridTableTag = &#34;CellPadding=2 width=650&#34;
    N.dbNameMap = &#34;Construction Schedule,Construction Schedule<FONT color=red>*</FONT>&#34;
    N.dbMagicCell = &#34;Colocation/MSA,align=center;Construction Schedule,align=center&#34;
    N.dbOptions = &#34;CellFontTag=Face=Arial Size=2&#34;
    N.ASPdb
    %>

    <p>

    <FONT color=&#34;#FF0000&#34; face=&#34;Arial&#34; size=&#34;2&#34;>*</FONT>

    <FONT face=&#34;Arial&#34; size=&#34;1&#34;> Colocation construction ONLY - &#34;Complete&#34; does not mean service readiness. Conduct a location search for product availability information.</FONT>
    </BODY>

    </HTML>

  3. #3
    Guest

    Error in exported session variable. (reply)

    I don&#39;t know what that means but I managed to make it work by placing another call to ASPdb above the first one.

    Code below:
    ==========================================
    <%
    Set N = Server.CreateObject(&#34;ASP.db&#34
    N.dbMDB = Server.MapPath(&#34;SERF.mdb&#34
    N.dbUnit = 13

    W=Request(&#34;OE_NAME&#34 &#39; Get what the user type in during the sql1 program

    if (W <> &#34;&#34 then &#39; Is this the first time in? If so, set the session
    Session(&#34;SesOE_NAME&#34 = W &#39; variable so the user&#39;s entry will be remembered.
    N.dbReset(14) &#39; new parameters just came in.

    LOCALSQL = Session(&#34;SesOE_NAME&#34&#39; + &#34;%&#34;

    sq = &#34;SELECT Tier FROM [Central Offices] WHERE (((OE_NAME)=&#39;&#34;
    sq = sq & LOCALSQL
    sq = sq & &#34;&#39)&#34;
    &#39;sq = sq & &#34; ORDER BY [CO_NAME]&#34;
    N.dbSQL = sq

    N.dbExportFlds = &#34;0&#34;
    N.dbGridHideFlds = &#34;0&#34;

    N.dbMode = &#34;Grid&#34;
    N.dbNavigation = &#34;None&#34;
    N.dbStatusBar = &#34;False&#34;
    N.ASPdb
    End if
    %>

    <P align=&#34;center&#34;><IMG border=&#34;0&#34; src=&#34;../images/cntrl_offc.gif&#34;>

    <BR>
    <FONT face=&#34;Arial&#34; size=&#34;4&#34;>for <B><%=Session(&#34;SesOE_NAME&#34%></B> (<%=Session(&#34;ASPdb_13_Tier&#34%>)</FONT>
    <p>

    <%
    Set N = Server.CreateObject(&#34;ASP.db&#34
    N.dbMDB = Server.MapPath(&#34;SERF.mdb&#34
    N.dbUnit = 14

    W=Request(&#34;OE_NAME&#34 &#39; Get what the user type in during the sql1 program

    if (W <> &#34;&#34 then &#39; Is this the first time in? If so, set the session
    Session(&#34;SesOE_NAME&#34 = W &#39; variable so the user&#39;s entry will be remembered.
    N.dbReset(14) &#39; new parameters just came in.

    LOCALSQL = Session(&#34;SesOE_NAME&#34&#39; + &#34;%&#34;

    sq = &#34;SELECT OE_NAME, CO_NAME AS [Central Office], Tier, Colocation AS [Colocation/MSA], [CoLo Construction Complete] AS [Construction Schedule] FROM [Central Offices] WHERE (((OE_NAME)=&#39;&#34;
    sq = sq & LOCALSQL
    sq = sq & &#34;&#39)&#34;
    sq = sq & &#34; ORDER BY [CO_NAME]&#34;
    N.dbSQL = sq

    N.dbExportFlds = &#34;0,2&#34;

    N.dbColor = &#34;white, 000066, #FFCC00, black, #EEEEEE&#34;

    N.dbMode = &#34;Grid&#34;
    N.dbNavigation = &#34;None&#34;
    N.dbStatusBar = &#34;False&#34;
    N.dbGridInc = &#34;600&#34;
    N.dbGridColSort = False
    N.dbGridHideFlds = &#34;0,2&#34;
    N.dbGridTableTag = &#34;CellPadding=2 width=650&#34;
    N.dbNameMap = &#34;Construction Schedule,Construction Schedule<FONT color=red>*</FONT>&#34;
    N.dbMagicCell = &#34;Colocation/MSA,align=center;Construction Schedule,align=center&#34;
    N.dbOptions = &#34;CellFontTag=Face=Arial Size=2&#34;
    N.ASPdb
    End if
    %>

    ------------
    Mark at 1/3/01 2:04:29 PM

    Ralph,
    I think you have a bug in your code. dbSQL will be undefined most of the time!
    Mark.


    ------------
    Ralph Asbury at 1/3/01 12:30:42 PM

    The problem that I am having is the Tier field (exported variable) displayed on the page does not automatically update after the first time it is displayed (HTML target frame for this page is _blank). The db.Reset function doesn&#39;t seem to be working. I&#39;ve tried adding <% response.buffer=true %> so that the page doesn&#39;t display until after it is done running the program and also added the meta tag to prevent cacheing of the page but this doesn&#39;t help. After the page is done loading, I can click Refresh on the browser and the correct Tier will display. The ASP code is split because there is a need to display the session variable before the grid is displayed.

    <% response.buffer=true %>
    <HTML>

    <HEAD>

    <TITLE>Central Office Report</TITLE>
    <META HTTP-EQUIV=&#34;Pragma&#34; CONTENT=&#34;no-cache&#34;>
    </HEAD>

    <BODY>

    <%
    Set N = Server.CreateObject(&#34;ASP.db&#34
    N.dbMDB = Server.MapPath(&#34;SERF.mdb&#34
    N.dbUnit = 14

    W=Request(&#34;OE_NAME&#34 &#39; Get what the user type in during the sql1 program

    if (W <> &#34;&#34 then &#39; Is this the first time in? If so, set the session
    Session(&#34;SesOE_NAME&#34 = W &#39; variable so the user&#39;s entry will be remembered.
    N.dbReset(14) &#39; new parameters just came in.

    LOCALSQL = Session(&#34;SesOE_NAME&#34&#39; + &#34;%&#34;

    sq = &#34;SELECT OE_NAME, CO_NAME AS [Central Office], Tier, Colocation AS [Colocation/MSA], [CoLo Construction Complete] AS [Construction Schedule] FROM [Central Offices] WHERE (((OE_NAME)=&#39;&#34;
    sq = sq & LOCALSQL
    sq = sq & &#34;&#39)&#34;
    sq = sq & &#34; ORDER BY [CO_NAME]&#34;
    N.dbSQL = sq

    end if
    %>

    <P align=&#34;center&#34;><IMG border=&#34;0&#34; src=&#34;../images/cntrl_offc.gif&#34;>

    <BR>
    <FONT face=&#34;Arial&#34; size=&#34;4&#34;>for <B><%=Session(&#34;SesOE_NAME&#34%></B> (<%=Session(&#34;ASPdb_14_Tier&#34%>)</FONT>
    <p>

    <%
    N.dbExportFlds = &#34;0,2&#34;

    N.dbColor = &#34;white, 000066, #FFCC00, black, #EEEEEE&#34;

    N.dbMode = &#34;Grid&#34;
    N.dbNavigation = &#34;None&#34;
    N.dbStatusBar = &#34;False&#34;
    N.dbGridInc = &#34;600&#34;
    N.dbGridColSort = False
    N.dbGridHideFlds = &#34;0,2&#34;
    N.dbGridTableTag = &#34;CellPadding=2 width=650&#34;
    N.dbNameMap = &#34;Construction Schedule,Construction Schedule<FONT color=red>*</FONT>&#34;
    N.dbMagicCell = &#34;Colocation/MSA,align=center;Construction Schedule,align=center&#34;
    N.dbOptions = &#34;CellFontTag=Face=Arial Size=2&#34;
    N.ASPdb
    %>

    <p>

    <FONT color=&#34;#FF0000&#34; face=&#34;Arial&#34; size=&#34;2&#34;>*</FONT>

    <FONT face=&#34;Arial&#34; size=&#34;1&#34;> Colocation construction ONLY - &#34;Complete&#34; does not mean service readiness. Conduct a location search for product availability information.</FONT>
    </BODY>

    </HTML>

Posting Permissions

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