Session variable size limitation (LV Webservices)

Hi community,
I read couple dozen email addresses from an XML and trying to write them into a session variable. The email addresses are comma separated and have a total string length of about 1100 characters. When I try to write it into a session variable LabVIEW drops an error message (-67158).
It is very clearly related to the size of the string as if use lets say only 200 characters I dont receive the error message.
How can I get rid of this limitation?
Thanks!

I am writing a general purpose webpage where I need email notifications. I have the workaround ready (before I send out the emails I dont read the emails from a session, but using the userID stored in the session to read the email from the xml). But generally having this limitation is annoying and unnecessary as normally you easily can store 100kB in one session. (probably even more, but that was the max I have ever did)

Similar Messages

  • Javacard and session variables

    Hello,
    I'm trying to find a reasonable Javacard technique to handle "session variables" that must be kept between successive APDUs, but must be re-initialized on each card reset (and/or each time the application is selected); e.g. currently selected file, currently selected record, current session key, has the user PIN been verified...
    Such variables are best held in RAM, since changing permanent (EEPROM or Flash) variables is so slow (and in the long run limiting the operational life of the card).
    Examples in the Java Card Kit 2.2.2 (e.g. JavaPurseCrypto.java) manipulate session variables in the following way:
    1) The programmers group session variables of basic type (Short, Byte, Boolean) according to type, and map each such variable at an explicit index of a vector (one per basic type used as session variable).
    2) At install() time, each such vector, and each vector session variable, is explicitly allocated as a transient object, and this object is stored in a field of the application (in permanent memory), where it remains across resets.
    3) Each use of a session variable of basic type is explicitly translated by the programmer into using the appropriately numbered element of the appropriate vector.
    4) Vector session variables require no further syntactic juggling, but eat up an object descriptor worth of permanent data memory (EEPROM or Flash), and a function call + object affectation worth of applet-storage memory (EEPROM, Flash or ROM).
    The preparatory phase goes:
    public class MyApp extends Applet  {
    // transientShorts array indices
        final static byte       TN_IX = 0;
        final static byte       NEW_BALANCE_IX=(byte)TN_IX+1;
        final static byte      CURRENT_BALANCE_IX=(byte)NEW_BALANCE_IX+1;
        final static byte      AMOUNT_IX=(byte)CURRENT_BALANCE_IX+1;
        final static byte   TRANSACTION_TYPE_IX=(byte)AMOUNT_IX+1;
        final static byte     SELECTED_FILE_IX=(byte)TRANSACTION_TYPE_IX+1;
        final static byte   NUM_TRANSIENT_SHORTS=(byte)SELECTED_FILE_IX+1;
    // transientBools array indices
        final static byte       TRANSACTION_INITIALIZED=0;
        final static byte       UPDATE_INITIALIZED=(byte)TRANSACTION_INITIALIZED+1;
        final static byte   NUM_TRANSIENT_BOOLS=(byte)UPDATE_INITIALIZED+1;
    // remanent variables holding reference for transient variables
        private short[]     transientShorts;
        private boolean[]   transientBools;
        private byte[]      CAD_ID_array;
        private byte[]      byteArray8;  // Signature work array
    // install method
        public static void install( byte[] bArray, short bOffset, byte bLength ) {
             //Create transient objects.
            transientShorts = JCSystem.makeTransientShortArray( NUM_TRANSIENT_SHORTS,
                JCSystem.CLEAR_ON_DESELECT);
            transientBools = JCSystem.makeTransientBooleanArray( NUM_TRANSIENT_BOOLS,
                JCSystem.CLEAR_ON_DESELECT);
            CAD_ID_array = JCSystem.makeTransientByteArray( (short)4,
                JCSystem.CLEAR_ON_DESELECT);
            byteArray8 = JCSystem.makeTransientByteArray( (short)8,
                JCSystem.CLEAR_ON_DESELECT);
    (..)and when it's time for usage, things go:
        if (transientShorts[SELECTED_FILE_IX] == (short)0)
            transientShorts[SELECTED_FILE_IX] == fid;
        transientBools[UPDATE_INITIALIZED] =
            sig.verify(MAC_buffer, (short)0, (short)10,
                byteArray8, START, SIGNATURE_LENGTH);I find this
    a) Verbose and complex.
    b) Error-prone: there is nothing to prevent the accidental use of transientShorts[UPDATE_INITIALIZED].
    c) Wastefull of memory: each use of a basic-type state variable wastes some code; each vector state variable wastes an object-descriptor worth of permanent data memory, and code for its allocation.
    d) Slow at runtime: each use of a "session variable", especially of a basic type, goes thru method invocation(s) which end up painfully slow (at least on some cards), to the point that for repeated uses, one often attain a nice speedup by caching a session variable, and/or transientShorts and the like, into local variables.
    As an aside, I don't get if the true allocation of RAM occurs at install time (implying non-selected applications eat up RAM), or at application selection (implying hidden extra overhead).
    I dream of an equivalent for the C idiom "struct of state variables". Are these issues discussed, in a Sun manual, or elsewhere? Is there a better way?
    Other desperate questions: does a C compiler that output Javacard bytecode make sense/exists? Or a usable Javacard bytecode assembler?
    Francois Grieu

    Interesting post.
    I don't have a solution to your problem, but caching the session variables arrays in local variable arrays is a good start. This should be only done when the applet is in context, e.g. selected or accessed through the shareable interface. This values should be written back to EEPROM at e.g. deselect or some other important point of time. Do you run into problems if a tear happens? I don't think so since the session variables should be transactional, and a defined point will commit a transaction.
    Analyzing the bytecode is a good idea. I know of a view in JCOP Tools (Eclipse plugin) where you can analyze the bytecode and optimize it to your needs.

  • Using Session Variables for User Login - sometimes they don't persist... what am I doing wrong?

    Hi all,
    I'm running a site that requires user login.  I approached the building of this site as almost a complete newb to CF (and dynamic coding in general), and it's been a great learing experience (with lots of help from you guys).
    However, I guess I never learned the correct way to handle a user login.  It seemed to me that I could just test the user-entered credentials against those stored in a database, then set a session variable containg that user's record number.  Then, not only would I have an easy way of knowing who this user was and therefore what info to serve him, but I could test for the existence of a valid login on every page in the protected folder, by adding this code to my application.cfc in that folder:
    <cfset This.Sessionmanagement=true>
    <cfset This.Sessiontimeout="#createtimespan(0,8,0,0)#">
       <cfif NOT isDefined ("session.username") or NOT isDefined ("session.password") or NOT isDefined ("session.storeID")>
         <cflocation url="../index.cfm" addtoken="no">
       </cfif>
    ...and it goes on to run a query and verify that the session.username and session.password match for the store defined by session.storeID.  If not, all session variables are cleared and it bounces you back to the login page.  When the user clicks Logout, all I do is delete all the session variables.
    This seemed to work great for like a year, but lately I've been getting reports that the login doesn't seem to persist for longer than approx. 20 minutes of inactivity.  You can see I specified session variables to remain active for 8 hours (I know that seems like a drastically long login, but it's what's necessary for this application).  I've only gotten this report from a few people, and I myself can't seem to duplicate it... I've tested an inactive login for 45 minutes now and it held.
    SO:  any reason you can think of why session variables would be spontaneously clearing for some people?  Would having your router reset its IP address invalidate the session or something?  Also, the problem seemed to begin appearing after my host upgraded all their servers to CF9... could there be any relation?
    And on a more general note... did I go about this completely the wrong way to begin with?  If so, what's the standard way to manage a login?
    Lots of questions, I know... thanks very much for any answers or suggestions!
    Joe

    Ian,
    Thanks very much - very helpful information.
    Sounds like passing the tokens in every request is probably the way to go for this.  I don't think it's likely that any users will be sharing links, unless they actually intend for the recipient to see their info anyway.
    Is that all I would have to do, is add the tokens to every path?  Would that guarantee that all the session variables would remain valid until timeout or being cleared?
    Again, thanks, you've been really helpful.
    Joe
    On Jun 23, 2010 4:37 PM, Ian Skinner &lt;[email protected]&gt; wrote:
    Unfortunately this is the nature of HTTP web applications.  There is NO state maintained from HTTP request to request.  This is by design in the HTTP protocol specifications.
    ColdFusion provides two methods to circumvent this limitation.  Each method has limitations and caveats.  They both rely on the passing of tokens between the client and the server with every request.  These tokens can be passed as cookies OR URL (GET) variables.  You are using the cookie method, which is the simpler and most common. You may be experiencing the limitation of this method.  If something happens to the cookies the session can be lost.
    You could pass the (CFID &amp; CFTOKEN) OR JESSIONID tokens through the URL query string with every request.  This requires one to add these values to every link, form action, cflocation or other request path in our application.  ColdFusion provides the session.urltoken variable to make this easier to do.  The tokens will be visible to the user.  Also if the links with an individual token is share with other users, via e-mail, chat, social networks, etc and one of these users utilize the link during the life of a session (8 hours apparently in your case).  Then that user will access the session of the original user.
    Cookie session management is by far the most common choice by CF developers.  If these methods do not meet your needs you would need to go beyond the HTTP limitations of web applications.  One might be able to accomplish this with a Flex|Air|Flash applications that can be configured to use a continuous connection to the server.  Thus not suffer the stateless nature of the normal HTTP request-response cycle.
    I do not know if a router resetting would cause cookies to be discarded or otherwise invalidated.  But I would not think it is beyond the relm of possibilities.

  • Session variable causing ADODB.Field error '800a0bcd'

    i have a page that before the session variable was added,
    would display the
    text i required if the recordset was empty.
    Now i have a session variable on the same page and if the
    recordset is
    empty, instead of showing the text i need displayed, i get
    the following
    error:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been
    deleted. Requested
    operation requires a current record.
    /Help_Desk/verified.asp, line 31
    If i remove the session variable code from the page, it works
    fine.....why
    the conflicts?
    <%Session("last")
    =(rsVerify.Fields.Item("c_last_name").Value)%>
    <%Session("first")
    =(rsVerify.Fields.Item("c_first_name").Value)%>
    <html>
    What im doing is verifying if a user exists in the database.
    If they do
    there name is stored in a session and used later on the
    following pages. If
    they do not exist, they are suppose to receive a message
    indicating to call
    our support center to update there name...
    I dont understand why the addition of the above two lines
    cause this error

    Here is all the code on the page... please let me know if
    there is something
    incorrect.....
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="../Connections/USD.asp" -->
    <%
    Dim rsVerify__varLname
    rsVerify__varLname = "%"
    If (Request.Querystring("last") <> "") Then
    rsVerify__varLname = Request.Querystring("last")
    End If
    %>
    <%
    Dim rsVerify__varFname
    rsVerify__varFname = "%"
    If (Request.Querystring("first") <> "") Then
    rsVerify__varFname = Request.Querystring("first")
    End If
    %>
    <%
    Dim rsVerify
    Dim rsVerify_numRows
    Set rsVerify = Server.CreateObject("ADODB.Recordset")
    rsVerify.ActiveConnection = MM_USD_STRING
    rsVerify.Source = "SELECT c_last_name, c_first_name,
    c_middle_name,
    c_email_addr FROM AHD.ctct WHERE c_last_name = '" +
    Replace(rsVerify__varLname, "'", "''") + "' and c_first_name
    = '" +
    Replace(rsVerify__varFname, "'", "''") + "' and del = '0'"
    rsVerify.CursorType = 0
    rsVerify.CursorLocation = 2
    rsVerify.LockType = 1
    rsVerify.Open()
    rsVerify_numRows = 0
    %>
    <%Session("last")
    =(rsVerify.Fields.Item("c_last_name").Value)%>
    <%Session("first")
    =(rsVerify.Fields.Item("c_first_name").Value)%>
    <html>
    <head>
    <title>Account Verification</title>
    </head>
    <body text="#000000" link="#0000FF" vlink="#0000FF"
    alink="#0000FF"
    leftmargin="0" topmargin="0">
    <!--#include virtual="/inc/header.asp" -->
    <br>
    <br>
    <% If Not rsVerify.EOF Or Not rsVerify.BOF Then %>
    <table width="605" align="center">
    <tr bgcolor="#9999FF">
    <td><strong>USD Name:</strong></td>
    <td><strong><%=(rsVerify.Fields.Item("c_last_name").Value)%>,
    <%=(rsVerify.Fields.Item("c_first_name").Value)%></strong></td>
    </tr>
    <tr>
    <td><strong>First
    Name:</strong></td>
    <td><strong><font
    color="#FF0000"><%=(rsVerify.Fields.Item("c_first_name").Value)%></font></strong></td>
    </tr>
    <tr>
    <td><strong>Last Name:</strong></td>
    <td><strong><font
    color="#FF0000"><%=(rsVerify.Fields.Item("c_last_name").Value)%></font></strong></td>
    </tr>
    <tr>
    <td><strong>Email:</strong></td>
    <td><strong><font
    color="#FF0000"><%=(rsVerify.Fields.Item("c_email_addr").Value)%></font></strong></td>
    </tr>
    <tr>
    <td><strong>Location:</strong></td>
    <td><strong><font
    color="#FF0000"><%=(rsVerify.Fields.Item("c_middle_name").Value)%></font></strong></td>
    </tr>
    <tr>
    <td colspan="2"><div
    align="center"><strong>If all 4 fields above
    contain
    your correct information please select from the links
    below.<br>
    If your are missing any information above please contact the
    help
    desk
    before proceeding.</strong> </div></td>
    </tr>
    <tr>
    <td colspan="2"><hr size="1"> <table
    width="400" align="center">
    <tr>
    <td><div align="center"><strong><a
    href="/Help_Desk/usd_stores1.asp">Open
    Store / DC
    Request</a></strong></div></td>
    <td><div align="center"><strong><a
    href="/Help_Desk/usd_corp1.asp">Open
    Corporate
    Request</a></strong></div></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <% End If ' end Not rsVerify.EOF Or NOT rsVerify.BOF %>
    <br>
    <div align="center">
    <% If rsVerify.EOF And rsVerify.BOF Then %>
    <table width="605">
    <tr>
    <td><div align="center"><font
    color="#FF0000"><strong>If you are
    receiving
    this message, chances are you are not completely setup in
    USD.<br>
    Please contact the help desk to have your information
    verified and
    setup
    if needed.</strong></font>
    </div></td>
    </tr>
    </table>
    <% End If ' end rsVerify.EOF And rsVerify.BOF %>
    </div>
    <div align="center"></div>
    <!--#include virtual="/inc/footer.asp" -->
    </body>
    </html>
    <%
    rsVerify.Close()
    Set rsVerify = Nothing
    %>
    "Daniel" <[email protected]> wrote in message
    news:[email protected]...
    >i have a page that before the session variable was added,
    would display the
    >text i required if the recordset was empty.
    >
    > Now i have a session variable on the same page and if
    the recordset is
    > empty, instead of showing the text i need displayed, i
    get the following
    > error:
    >
    > --------------------------
    > ADODB.Field error '800a0bcd'
    > Either BOF or EOF is True, or the current record has
    been deleted.
    > Requested operation requires a current record.
    >
    > /Help_Desk/verified.asp, line 31
    > -----------------------------
    >
    > If i remove the session variable code from the page, it
    works fine.....why
    > the conflicts?
    >
    > <%Session("last")
    =(rsVerify.Fields.Item("c_last_name").Value)%>
    > <%Session("first")
    =(rsVerify.Fields.Item("c_first_name").Value)%>
    > <html>
    >
    > --------------
    >
    > What im doing is verifying if a user exists in the
    database. If they do
    > there name is stored in a session and used later on the
    following pages.
    > If they do not exist, they are suppose to receive a
    message indicating to
    > call our support center to update there name...
    >
    > I dont understand why the addition of the above two
    lines cause this error
    >
    >

  • How to Get Around the Memo Size Limitations in CR ?

    I am Using Crystal Reports 2008, SQL Database and ASP .Net Visual Studio 2010 for Team Foundation with Crystal Viewer embedded in a web page.  All current update and patches area installed.
    Database has Memo Fields up to 164000 characters in length. Viewer show fine, but with the reports that have been designed to print this information, only seeing part of the Memo field.
    This happens with both RTF, Text and HTML formatted data from within the database field.
    I have read that there is a limitation on the size of a Memo field that Crystal Reports will print (65,534).
    I actually received an Crystal Reports error box when i try to concatenate multiple substring fields as a formula.
    Does anyone have any suggestions or ideas on a work-around ? 
    Due to legal considerations, this data has to be output as it was input, so it can't be hacked. It can be parsed and again merged  but I really donu2019t want to try and write SQL procedures to parse HTML code into readable multiple pieces based on variable length tags with large memo fields.
    Please offer any and every suggestion,
    Thanks to all  ! !
    Edited by: Ludek Uher on Oct 21, 2010 1:31 PM

    yes sir,
    already did but i didn't receive any answers. . .   Memo Field Size Limitations with Crystal Reports 2008 ?
    Thanks for your help.

  • Printing a Web Report Using Firefox Results in Lost Session Variables

    Post Author: AVXFlyer
    CA Forum: .NET
    I'm  having a problem with Firefox users printing a Crystal Report from a web site. 
    The first page of the web site collects information to be used in the report generation, for example, start date, end date, type of report etc.  These are all various text boxes, drop down lists, radio buttons and check boxes.  When the user clicks to show the report, everything works fine and the first page of the report will display. The code behind this page takes care of saving al the session variables into hidden fields on the page so the settings will be accessible when the user clicks to view the next page of the report.
    On clicking to view the next page of the report, everything is still fine and the process works beautifully and I've had no problems. 
    A new problem has surfaced during the printing of these reports.  Users who use IE6.0 or IE 7.0 do not have a problem, however, users who use Firefox do have a problem.
    It seems that the print dialog which appears as part of the the Crystal web control manages to 'lose" the variables which were present on the calling page.  It only does this with the Firefox browser.  Calls on postback to retrieve the variables from the hidden fields result in 0's or empty strings ("").
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init .... ....  If Me.IsPostBack = False Then ... ...        strDiscontinuedOnly = Request.Form.Item("ddlInvStatus")             If strDiscontinuedOnly = Nothing Then                 isDiscontinuedOnly = False             Else                 Select Case strDiscontinuedOnly                     Case 0 'All Inventory                         isDiscontinuedOnly = False                     Case 1 'Discontinued Inventory                         isDiscontinuedOnly = True                     Case 2 'Active Inventory                         isDiscontinuedOnly = False                 End Select             End If Else 'Postback is true             intRequestedReport = Request.Form.Item("fldReportID")             strDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly")             isDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly") ... ... end if

    Can't explain it, but here are a few tests;
    1) Try to print a saved data report
    2) Try to print a report that is not using parameters
    3) Try a different printer driver as "default"
    4) Enable the option "Dissociate Formatting Page Size and Printer Paper Size" on the report
    5) What format do you export to?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to pass a session variable to the bussines layer?

    Hello,
    I am doing a management application, and I need to store the login user that make insertions on any table, and the pages does not has backing beans.
    I had try to do that bindding the value field of a hidden attribute with the session variable, but it only change the value of the one. My second attempt was make an javascript function to do that on the page´s load, but it not looks like a good solution.
    Someone knows a way to sent the session value to the bussines layer? O a way to access from the Bussines layer to the session?
    Thanks
    Tony

    <p>
    Hi,
    </p>
    <p>
    Another solution (that I always use) is storing simultaneously the same data in HttpSession (in view layer) and session hashtable (in businness layer).
    </p>
    <p>
    You can put and get these data in any businness component using following methods:
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">
    private void setToJboSession(String key, Object val){</font>
    <font face="courier new,courier" size="2" color="#0000ff"> Hashtable userData = getDBTransaction().getSession().getUserData();
    if (userData == null) {
    userData = new Hashtable();
     userData.put(key, val);
    }</font>
    </p>
    <p>
     and
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">
    private Object getFromJboSession(String key){
     return getDBTransaction().getSession().getUserData().get(key);
    }</font>
    </p>
    <p>
    Kuba 
    </p>

  • Need Help With Redirect That Uses Session Variable

    I am new to dynamic sites, php, and developer toolbox, but I have been able to create a login site using the different form wizards fairly easily (in CS3 with Developers toolbox).
    <br />
    <br />I am trying to set a server behavior on a page that redirects the user to a new page if a session variable matches a recordset.
    <br />
    <br />I was using an extension (PHP Sessions - http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=681308 ) that worked great, but when I installed developers toolbox, it stopped working (get error message about runtime/MX environment).
    <br />
    <br />Ive been struggling for days and this is what Ive come up with so far:
    <br />------------------------------------
    <br />session_start();
    <br />if (!isset($HTTP_SESSION_VARS[$_SESSION['kt_firstname']]) || $HTTP_SESSION_VARS[$_SESSION['kt_firstname']] = $row_Recordsetfname['firstname']) {
    <br /> header ("Location: ../firstname/firstname1.php");
    <br />}
    <br />------------------------------------
    <br />
    <br />It redirects regardless of the match. Any ideas on what I can do to get this working? Here is all of the code (with block from above inserted) up until the doc type:
    <br />------------------------------------
    <br /><?php require_once('../Connections/project1.php'); ?>
    <br /><?php<br />// Load the tNG classes<br />require_once('../includes/tng/tNG.inc.php');<br /><br />// Make unified connection variable<br />$conn_project1 = new KT_connection($project1, $database_project1);<br /><br />//Start Restrict Access To Page<br />$restrict = new tNG_RestrictAccess($conn_project1, "../");<br />//Grand Levels: Any<br />$restrict->Execute();<br />//End Restrict Access To Page<br /><br />if (!function_exists("GetSQLValueString")) {<br />function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") <br />{<br />  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;<br /><br />  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);<br /><br />  switch ($theType) {<br />    case "text":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;    <br />    case "long":<br />    case "int":<br />      $theValue = ($theValue != "") ? intval($theValue) : "NULL";<br />      break;<br />    case "double":<br />      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";<br />      break;<br />    case "date":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;<br />    case "defined":<br />      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;<br />      break;<br />  }<br />  return $theValue;<br />}<br />}<br /><br />// FELIXONE - 2002   SB by Felice Di Stefano - www.felixone.it<br />session_start();<br />if (!isset($HTTP_SESSION_VARS[$_SESSION['kt_firstname']]) || $HTTP_SESSION_VARS[$_SESSION['kt_firstname']] = $row_Recordsetfname['firstname']) {<br />  header ("Location: ../firstname/firstname1.php");<br />}<br /><br />$colname_Recordsetfname = "-1";<br />if (isset($_SESSION['kt_user_name'])) {<br />  $colname_Recordsetfname = $_SESSION['kt_user_name'];<br />}<br />mysql_select_db($database_project1, $project1);<br />$query_Recordsetfname = sprintf("SELECT firstname FROM registration WHERE user_name = %s", GetSQLValueString($colname_Recordsetfname, "text"));<br />$Recordsetfname = mysql_query($query_Recordsetfname, $project1) or die(mysql_error());<br />$row_Recordsetfname = mysql_fetch_assoc($Recordsetfname);<br />$totalRows_Recordsetfname = mysql_num_rows($Recordsetfname);<br /><br />$colname_Recordset1 = "-1";<br />if (isset($_SESSION['kt_user_name'])) {<br />  $colname_Recordset1 = $_SESSION['kt_user_name'];<br />}<br />mysql_select_db($database_project1, $project1);<br />$query_Recordset1 = sprintf("SELECT `Date` FROM registration WHERE user_name = %s", GetSQLValueString($colname_Recordset1, "text"));<br />$Recordset1 = mysql_query($query_Recordset1, $project1) or die(mysql_error());<br />$row_Recordset1 = mysql_fetch_assoc($Recordset1);<br />$totalRows_Recordset1 = mysql_num_rows($Recordset1);<br />?>
    <br />
    <br />------------------------------

    I am new to adobe toolbox... I ve created a ligin page but not sure how to pass the session variable. I am trying to direct successful login to a page like... index.php?id=filter
    <br />
    <br />been struggling all day with this. Please help!!!
    <br />
    <br /><?php require_once('Connections/comm.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_comm = new KT_connection($comm, $database_comm);<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$formValidation->addField("kt_login_user", true, "text", "", "", "", "");<br />$formValidation->addField("kt_login_password", true, "text", "", "", "", "");<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />// Make a login transaction instance<br />$loginTransaction = new tNG_login($conn_comm);<br />$tNGs->addTransaction($loginTransaction);<br />// Register triggers<br />$loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1");<br />$loginTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");<br />// Add columns<br />$loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user");<br />$loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password");<br />$loginTransaction->addColumn("kt_login_rememberme", "CHECKBOX_1_0_TYPE", "POST", "kt_login_rememberme", "0");<br />// End of login transaction instance<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rscustom = $tNGs->getRecordset("custom");<br />$row_rscustom = mysql_fetch_assoc($rscustom);<br />$totalRows_rscustom = mysql_num_rows($rscustom);<br /><br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br /><?php echo $tNGs->displayValidationRules();?>
    <br />
    <br />
    <br />
    <br /><?php<br /> echo $tNGs->getLoginMsg();<br />?>
    <br /><?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <br />
    <form method="post" id="form1" class="KT_tngformerror" action="%3C?php%20echo%20KT_escapeAttribute(KT_getFullUri());%20?%3E">
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table cellpadding="2" cellspacing="0" class="KT_tngtable">
    <tr>
    <td class="KT_th">
    <label for="kt_login_user">Username:</label>
    </td>
    <td>
    <input type="text" name="kt_login_user" id="kt_login_user" value="<?php echo KT_escapeAttribute($row_rscustom['kt_login_user']); ?>" size="32" />
    <br /> <?php echo $tNGs->displayFieldHint("kt_login_user");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_user"); ?></td>
    </tr>
    <tr>
    <td class="KT_th">
    <label for="kt_login_password">Password:</label>
    </td>
    <td>
    <input type="password" name="kt_login_password" id="kt_login_password" value="" size="32" />
    <br /> <?php echo $tNGs->displayFieldHint("kt_login_password");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_password"); ?></td>
    </tr>
    <tr>
    <td class="KT_th">
    <label for="kt_login_rememberme">Remember me:</label>
    </td>
    <td>
    <input <?php if (!(strcmp(KT_escapeAttribute($row_rscustom['kt_login_rememberme']),"1"))) {echo "checked";} ?> type="checkbox" name="kt_login_rememberme" id="kt_login_rememberme" value="1" />
    <br /> <?php echo $tNGs->displayFieldError("custom", "kt_login_rememberme"); ?></td>
    </tr>
    <tr class="KT_buttons">
    <td colspan="2">
    <input type="submit" name="kt_login1" id="kt_login1" value="Login" />
    <br /></td>
    </tr>
    </table>
    <br />
    <a href="forgot_password.php">Forgot your password?</a>
    <br /></form>
    <br />
    <p>&#160;</p>
    <br />
    <br />

  • What is session variables in BSP

    Hi
    I am using using IC Webclient. can anyone help me to findout the details about session varibales ?
    Best Regards
    Bhavishya

    hi,
    Session variables is a handy way to define a persistent variable.The standard variables used in ColdFusion can be only transferred or sent to the next page before it is necessary to restate the variable. In some situations, you may want to define a variable that will apply to all the pages during a single session of the user. An example is when the pages a user sees are personalized to his or her specific needs. In such a case, session variables are defined and used.
    Session variable persistent
    A session variable is one of several types of variables that persist across multiple templates:
    >Server variables - Accessible by all clients and applications on a single
    >Application variables - Tied to a single application and accessible by multiple clients
    >Client variables - Tied to a single client over multiple sessions
    >Session variables - Exist for one client or browser during a single session
    >Cookie variables
    Session variables are designed to hold information that you seldom write but are read often.
    Defining session variables
    Session variables are normally defined in the Application template, but can be also defined on all applicable pages.
    Application template
    The standard method of using session variables is to define them in the application.cfm template, which is a special ColdFusion page that is processed before the other pages in a session. It usually should be in the session root directory.
    CFAPPLICATION tag
    To enable the use of session variables, as well as client and application management, you should use the CFAPPLICATION tag in the Application template. A typical tag would be:
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes"
    SESSIONTIMEOUT="#CreateTimeSpan(0, 0, 20, 0)#">
    where:
    >NAME is required to avoid problems if you have session variables tied to separate applications.
    >SESSIONMANAGEMENT is required to enable the session variables.
    >SESSIONTIMEOUT is optional and limits the time the variables will stay in memory (20 minutes in the example) Note that the default is 20 minutes, so you really may not need this unless you want to change that number.
    Setting variables
    After the CFAPPLICATION tag, you can set your session variables, using the CFSET tag. You must always refer to session variables with the prefix session. Thus, you could define a session variable, such as:
    <CFSET session.name="#form.othername#">
    Should lock variables
    You should lock the session variables to avoid problems when several people are using the system at the same time. An example of this is:
    <CFLOCK TIMEOUT="30" NAME="#session.sessionID#" TYPE="Exclusive">
    <CFSET session.name="#form.othername#">
    </CFLOCK>
    Defined on applicable pages
    A problem in using the Application.cfm template is that it is often difficult to change your session variables, once they have been set. An alternative is to use the CFAPPLICATION tag in each applicable page:
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes">
    You then can define the session variable in the first page, accessed:
    <CFOUTPUT QUERY="return">
    <CFSET session.ID="#ID#">
    </CFOUTPUT>
    This is a compromise between the standard method and defining the variable on each page.
    Example of use
    Suppose a user logged in to the site. His name could be sent through a form and entered in Application.cfm. Then the session will constantly refer to him by name.
    Application.cfm
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes">
    <CFSET session.name="#form.othername#">
    Start.cfm
    <CFOUTPUT>
    <H1>Hello #session.name#</H1>
    </CFOUTPUT>

  • Application.cfm - Should I use queries or set session variables?

    Hi,
    I have an application that has many users for many different
    companies logged in at the same time using the system. I use the
    application.cfm to call and set a bunch of variables that make the
    system work, such as preferences and things. Would it be better to
    use 5 or 6 queries all pulling one record, or call the queries only
    once at the start of the session and set 30 to 50 session variables
    based on the query results? Which method would bog the system down
    less? It seems that session variables use quite a bit of memory.
    I'm just trying to get the "simple answer" for this, if that's even
    possible.
    Please let me know your thoughts and experience on this.
    Thanks much,
    Jeff W!

    In order to give you a simple "do it this way" answer, more
    information is needed.
    How long does it take to run those 5-6 queries on each
    request? How many users are logged in at peak times? How much data
    would you be storing in the session for each user? How much RAM do
    you have on your server?
    On one application, we've decided to go the session variable
    route. The size for each users' session maxes out at 2.5 KB. We
    have 512 MB dedicated to CF, but can easily scale up on the
    hardware we have to 1.5 GB or more. At 512 MB, 2.5 KB per user
    session, we can handle a little over 200,000 concurrent users
    (assuming all CF memory could be utilized for session variables,
    which isn't true). There are only 6,000 users total in our system,
    so we have quite a bit of headroom.
    Are you on CF8? If so, open up the server monitor, start
    monitoring, profiling, and memory tracking, and log in with a
    couple users (with your code setup to store all that info in the
    session). See how much storage each session takes. Then look at
    your server. How much RAM do you have? what do you currently have
    allocated to ColdFusion? What's your peak concurrent user level? Do
    you have headroom? Also, see if the benefits of storing it in the
    session are even worth it (how long do those 5-6 queries add to
    each requst?)

  • Set session variables inside a page

    Inside the page "form.cfm" I have this code:
    <form name="report" action="pagestatistic.cfm"
    method="post">
    <INPUT name=ONE size=15 >
    <INPUT name=TWO size=15 >
    <input type="submit" value="Go ON">
    </form>
    I would like to set session variable: ONE and TWO, inside the
    page: pagestatistic.cfm
    IN that way when I will refresh the page "pagestatistic.cfm"
    I will watch have the same results.
    I added this code at the top of "pagestatistic.cfm" but it
    doesn't work.
    <CFSET session.ONE = #ONE#>
    <CFSET session.TWO = #TWO#>
    Could you tell me what goes wrong?
    Thanks
    CFWork

    quote:
    Originally posted by:
    liquid One
    When you say refresh the page, do you mean submit the form by
    clicking on the submit button? Or are you filling out the input
    boxes and hitting refresh?
    I mean I clicked a link that links the same page:
    pagestatistic.cfm
    Then I would like to add to this link 2 get variables
    pagestatistic.cfm?ColorPage=Green&Order=2 to change the
    background color and the order of the results of the page. That it
    is impossible because when i refresh the page it is doesn't work.
    What do you suggest me to do?
    Thanks,
    CfWork

  • String size limitations, HTML table

    Post Author: Jeff Kulbeth
    CA Forum: General
    I am currently using CR 8.5 and am aware of string size limitations... 254 characters max.  I'm looking at CR XI and can't find any data on string size limitations.  A few questions:
    1) We're considering database fields larger than 254 characters, and would like to use CR to parse the field.  In CR XI, what's the maximum string length that can return from a table and still be used in a formula?   Can a Memo field be used in a formula in CR XI? 
    2) Once I've parsed the fields in the database table, I'll need to return formatted strings back to the report.  The strings will be larger than 254 character ... What's the maximum string size allowed in CR XI?
    3) Somewhat related, but not entirely:  Have any patches been released that provide HTML table interpretation in CR XI?
    Thanks for the help,
    Jeff Kulbeth

    Post Author: V361
    CA Forum: General
    The maximum length of a String constant, a String value held by a String variable, a String value returned by a function or a String element of a String array is 65,534 characters.
    The maximum size of an array is 1000 elements.
    The maximum number of arguments to a function is 1000. (This applies to functions that can have an indefinite number of arguments such as Choose).
    Not sure about the HTML ?

  • Dreamweaver need to create a session variable or Cookie or something Help

    I have been working for weeks I am very close but can't get over one last hurdle. I am trying to call a session variable much like dreamweaver calls mm_username. It is in the same user table as username - password - access level - Customer_id. I need to pull the session variable or cookie or however I can do it to access the customer id number so I can have customer specific information and pricing. There will be mulitple users for each customer so I need another variable besides mm_username. Help I use dreamweaver cs4 aspvbscript and sqlserver ...help

    I soon as I put the red line of code in it is custoemr _id instead of user id in my table. Dreamweaver removes the user id function. is it in the wrong place ...what am i doning wrong ....it is fine with the first part you did but the second part it doesnt like in red.
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include virtual="/Connections/p21.asp" -->
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
      Dim MM_fldUserAuthorization
      Dim MM_redirectLoginSuccess
      Dim MM_redirectLoginFailed
      Dim MM_loginSQL
      Dim MM_rsUser
      Dim MM_rsUser_cmd
      MM_fldUserAuthorization = "Access_Level" 
      MM_redirectLoginSuccess = "/mainmenu.asp" 
      MM_redirectLoginFailed = "/loginfailed.asp" 
      MM_loginSQL = "SELECT customer_id, Login_Name, password"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM dbo.btb_web_login WHERE Login_Name = ? AND password = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_p21_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 20, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 10, Request.Form("password")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute 
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        Session ("MM_USERID") = MM_rsUser.Fields.Item("customer_id").value
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Brown Live Online Login</title>
    <style type="text/css">
    <!--
    body {
        background-image: url(/images/gradientblacktowhite.jpg);
        background-repeat: repeat-x;
    .style1 {
        color: #FFFFFF;
        font-weight: bold;
    .style3 {color: #000000; font-weight: bold; }
    .style5 {
        font-size: xx-large;
        color: #0000FF;
    .style6 {color: #000000}
    -->
    </style></head> 
    <body>
    <p class="style5"><img src="/images/BTBlogosmall.jpg" width="322" height="53" /></p>
    <p class="style5">Brown Live Online 2.0 </p>
    <form ACTION="<%=MM_LoginAction%>" id="form1" name="form1" method="POST">
      <p>
        <label><span class="style3">    User Name</span>
        <input name="username" type="text" id="username" size="20" />
        </label>
      </p>
      <p>
        <label><span class="style1"><span class="style6">Password</span></span>
        <input name="password" type="password" id="password" size="20" />
        </label>
      </p>
      <p>
        <label>
        <input type="submit" name="button" id="button" value="Login" />
        </label>
      </p>
    </form>
    <p><a href="/index.html"><img src="/images/brown2.0.jpg" width="100" height="100" /></a> Click Image to return to <a href="http://www.browntransmission.com">www.browntransmission.com</a></p>
    </body>
    </html>

  • Question about session variables and binding

    Hi All,
    I'm a newbie with Application Express. I've gone through several tutorials and a book, and now I'm actually getting started with apex. My first adventure is a tiny little form, where all you do is fill it out and it sends an email. Pretty simple.
    And, i have it working just fine - but I have a question about something I don't quite understand. Basically, I am generating the email text in a page process. And some of the form fields work fine if i reference them as *:ACCT_NAME*, but some give me the dreaded "not all variables bound" error. For the ones that give me the error, I can reference them like V('ACCT_NAME').
    So, as a newbie, I'm a little confused. When is it appropriate to use the V function, and when it is appropriate to use binding? Why would one of the fields work with binding but not another from the same form?
    Thanks for any clarification you can offer,
    Lisa

    Lisa,
    A bind variable is a place holder variable available in an environment.It is used quite frequently(outside Apex Context) in SQL and PLSQL scripts and especially in Dynamic SQL statements.Many times using a bind variable gives better performance. In the Apex environment,page items and many other variables related to the session are available as bind variables and hence their value can be referred in SQL,PLSQL contexts as :VARIABLE_NAME.
    Now V() function is an apex specific function which returns the value of an apex session variable outside the apex environment. So as Machaan pointed out, it is used in
    procedures and triggers that gets called from within an apex session. This is required since the bind variables themselves are not directly available in the SQL environment but their values from the corresponding session can be accessed by this apex built-in function.
    The length of any Bind variable name is limited to 30 characters, this is a limitation inherited from Oracle SQL itself and hence session variables(page or application items) whose name has a length which exceeds 30 characters cannot be used as the :ITEM_NAME format. In such cases you would have to use the v() method again. This might be happening in your case.

  • How to store session variables in drop down menu (and radiobutton/checkbox)

    How am I going to store session variables in the drop down menu, radio button, checkbox.
    In text area, I do like below:
    <input type="text" name="membershipno" size="5" maxlength="50" value="<%=((session.getValue("Smembershipno")!=null)?session.getValue("Smembershipno"):"") %>">
    Any idea?

    Hi jeffkyt79, I could have answered this on Expert's Exchange. But I suppose it would be hard as the site is down right now :-(
    Here is sample code for the form:
    <form action="" name="form1">
    <input type="text" name="field1" value="<%
    if (session.getAttribute("field1")!=null) {
    out.println(session.getAttribute("field1"));
    } %>"><br>
    <input type="text" name="field2" value="<%
    if (session.getAttribute("field2")!=null) {
    out.println(session.getAttribute("field2"));
    } %>"><br>
    <input type="text" name="field3" value="<%
    if (session.getAttribute("field3")!=null) {
    out.println(session.getAttribute("field3"));
    } %>"><br>
    <input type="checkbox" name="check1" value="tick"<% if (session.getAttribute("check1")!=null) out.println(" checked"); %>><br>
    <% String selRadio=(session.getAttribute("r1")!=null)?(String)session.getAttribute("r1"):""; %>
    <input type="radio" name="r1" value="yesdot"<% if (selRadio.equals("yesdot")) {out.println(" checked");} %>>
    <input type="radio" name="r1" value="nodot"<% if (selRadio.equals("nodot")) {out.println(" checked");} %>><br>
    <select name="sel">
    <% String selOption=(session.getAttribute("sel")!=null)?(String)session.getAttribute("sel"):""; %>
    <option value="option1"<% if (selOption.equals("option1")) {out.println(" selected");} %>>OPTION 1
    <option value="option2"<% if (selOption.equals("option2")) {out.println(" selected");} %>>OPTION 2
         <option value="option3"<% if (selOption.equals("option3")) {out.println(" selected");} %>>OPTION 3
    </select>
    </form>
    And here's the revised javascript function to put in form1.jsp:
    function newWin() {
    f=document.form1.elements;
    str="?";
    mypage="test2.jsp"; // I've hardcoded the url for testing but you can fix this
    for (i=0;i<f.length;i++) {
    if (f.type=="text") {
    if (f[i].value!="") {
    str=str+f[i].name+"="+f[i].value+"&";
              continue;
         if (f[i].type=="checkbox"||f[i].type=="radio") {
         if (f[i].checked) {
         str=str+f[i].name+"="+f[i].value+"&";
         if (f[i].type=="select-one") {
         str=str+f[i].name+"="+f[i].options[f[i].selectedIndex].value+"&";
    str=str.substr(0,str.length-1);
    // now open the popup
    mypage+=str;
    win=window.open(mypage, 'myname'); // I've left out the winprops but you can fix this
    If you can ask any more questions, could you do it on EE (if possible!!). I know this works because I've tested it.

Maybe you are looking for

  • ISE Failed to Create Network Device Error

    I am trying to add new network device to a new out of the box ISE 3315 appliance under the Administration > Network Resources section.  I was able to do this the other day but now when I try I get an error that says "Failed to create network device. 

  • Exporting for TV from FCP X

    Hey team, I need to complete a job for a SD TV station... They have given me the following specs: 702 x 576 pixels in an aspect ratio of 16:9 FHA (Full Height Anamorphic) 25 frames per second (50 fields) interlaced - now known as 576i/25. colour sub-

  • How to make MTS work

    does oracle need specific hardware for the server to make Multithreaded server work . coz i make all necessary init parameter and it does not work , when i connect using shared connection..

  • Strange iTunes problem (can't find answer anywhere)

    Basically I run iTunes and, with or without the iPod connected, with or without music playing, my mouse and keyboard begin to intermittently freeze. i.e. here's how it might go: -Run iTunes -For 10-30 seconds it runs fine -Suddenly my mouse and keybo

  • "Purchased Music" folder shows different music on different macs...

    All the music was purchased with the same ID. But over the years, they were purchased from different authorized machines in my household. Some mac some windows (I am under the authorized computer limit of 5). Recently, I consolidated all the purchase