Problem with Session variables

On page 1, I'll put a session based on a user variable to connect:

< cfif NOT IsDefined "(SESSION. EmpNo") >
< cfset SESSION. EmpNo = #Form.HREmpNo # >
< / cfif >

On page 2, I call the session variable in a query to a form in advance, it works fine:

< cfquery name = "qEmpInfo" datasource = "SelfNom" >
SELECT *.
OF tblEmployeeList
WHERE EmployeeNo = #session. EmpNo #.
< / cfquery >

On the same page, I give the pre-populated information hidden tags, so I can enter information in a table on the next page. qEmpInfo is the request that I'm hitting successfully with my session variable. Here are my tags:

#qEmpInfo.EmployeeNo # < cfoutput > < / cfoutput >
< input type = "hidden" name = "EmployeeNo" value = "" #qEmpInfo.EmployeeNo # "/ >"

On the 3rd page, where I'm trying to insert information in another table, I am getting an error. Itacts as my session variable is over.

Error:
Syntax error in date in a query expression ' #qEmpInfo.EmployeeNo # '.

I entered this code in page 3 to check and she in the past that I guess because it does not find the session variable:

< cfif NOT IsDefined "(SESSION. EmpNo") >
< cfoutput > #session. EmployeeNo # < / cfoutput >
< / cfif >

I put my session expires in the admin for 24 hours, so it's not the question. And I turned on the session variables in the Application.cfm:

< name cfapplication = "SelfNom".
sessionmanagement = "Yes" >



Someone sees something I am doing wrong?

Jatrix wrote:
> Does someone sees something I am doing wrong?

Well, the first thing I noticed is this:

#session. EmployeeNo #.

'session.empNo' AND ' session. EmployeeNo' are not the same variable. You
Verify the existence for the first and then try to get out of the second.
You create a variable named "employeeNo" in your form. It is that the
the one you want to use here? "form.employeeNo" not "session.employeeNo".

Tags: ColdFusion

Similar Questions

  • Problem with session variable purging

    Hello

    I've set up in my solution OBIEE RLS filters, in accordance with article http://www.rittmanmead.com/2012/03/OBIEE-11g-security-week-row-level-security/
    All that " works very well, but I have a " "" small "problem (explained in short 'story'):

    ' 1. Suppose that user Walter White has affected Reg1 and Reg2 in " ""STAFF_REGIONS" table.

    2 after scoring in the responses the variable "NQ_SESSION." "REGION" is initialized with the values " ""Reg1 & Reg2"

    3 now I am adding Reg3 to the table ""STAFF_REGIONS " of Walter White."

    4 Walter White is logging in the responses and retains data only from Reg1 and Reg2 - why? Because variable NQ_SESSION. REGION still has the old values.

    So, here is my question: How can I reset it variable? Reconnection to the answers doesn't help. The only solution I know not is to restart CoreApplication, but this is not an acceptable solution.

    Uncheck the box for hidden in InitBlock variable

    If brand aid

    ~ http://cool-bi.com

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Problems with Bind Variables

    SELECT co.ref_num, co.forename, co.surname, co.dob, a.address, a.postcode,
           co.ni_num
      FROM address a, contact co
     WHERE co.ref_num = a.ref_num
       AND (:1 IS NULL OR co.forename = :2)
       AND (:3 IS NULL OR co.surname = :4)
       AND (:5 IS NULL OR a.postcode = :6)
       AND (:7 IS NULL OR a.address = :8)
       AND (:9 IS NULL OR co.dob = :10)
       AND (:11 IS NULL OR co.ni_num = :12)
    With a jdbc connection, we use a web front end for a new management system. The SQL above runs since a search screen. We meet a few serious problems with bind variable and execution plans. When the above query is sent by the database 'AND' clauses could evaluate as follows:
    AND ('Tim' IS NULL OR co.forename = 'Tim')
       AND ('Clarke' IS NULL OR co.surname = 'Clarke')
       AND ('' IS NULL OR a.postcode = '')
       AND ('' IS NULL OR a.address = '')
       AND ('25051981' IS NULL OR co.dob = '25051981')
       AND ('' IS NULL OR co.ni_num = '')
    We cannot dynamically assign 'AND' conditions so they are sent through to the database. This translates FTS 99% of the time as the execution plan never prescribed any of the available indices.

    Someone has suggestions on how to better 'control' bind variables?

    Hello

    Don't you think that 'OR' Conditions are necessary to check for Null, where the binding variable is NULL or not.

    I think that rather than running the query from the front to FB, try to convey the values of some MS and run this query in the procedure, the extraction from the point of view Design coding application. Never fire the query of the frontal part.

    To come to the problem.

    SELECT co.ref_num, co.forename, co.surname, co.dob, a.address, a.postcode,
    Co.ni_num
    ADDRESS, contact co
    WHERE co.ref_num = a.ref_num
    AND (: 1 co.forename IS NULL or =: 2)
    AND (: 3 co.surname IS NULL or =: 4)
    AND (: 5 a.postcode IS NULL or =: 6)
    AND (: 7 a.address IS NULL or =: 8)
    AND (: 9 co.dob IS NULL or =: 10)
    AND (: 11 co.ni_num IS NULL or =: 12)

    Use the procedure.

    Fact exits of the indexes on the tables and stats are updated...?
    Try to predict explain it. ??

    -Pavan Kumar N

  • Level security line with session variables, not recommended?

    Hello

    We are on the point of implement security level line in our project of BI using OBIEE, and the solution that we found more convenient to our requirement was to use session with blocks of initialization variables.

    The problem is that this method is listed as "not recommended" in the Oracle documentation.

    Administration of alternative security options - 11g Release 1 (11.1.1)

    (This appendix describes alternative security administration options included for backward compatibility with improved systems and are not considered a best practice.)

    The Session Variables management

    Session system variables get their values of initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Each active session of BI server generates session variables and initializes them. Each instance of session variable can be initialized to a different value. For more information on the use of variables and blocks of Oracle Business Intelligence session initialization, see 'Use of Variables in Oracle's BI repository' in Oracle Fusion Middleware metadata repository Builder of Guide for Oracle Business Intelligence Enterprise Edition.

    How confused... What is the best practice then?

    Thank you for your help.

    Joao Moreira

    authentication / authorizing the part is dealing with weblogic and then initialized the variable USER and you can use it for any initblocks for safety.

    Block of init to authenticate / variable session and authorization are different, I guess that you mix the two.

  • PHP Mail with session variables

    Here is the code for an email to collect page, which sends two session variables (email and postal code) to an email_sub.php page (data are inserted in MySQL). After submitting the form, I get the email_sub.php? page where this code works normally

    <? PHP echo $_SESSION ['email'];? >

    <? PHP echo $_SESSION ['postal code'];? >

    However, when the email is sent, the "subject" and the "To" is successfully sent, but not the variables $email and $zipcode.

    From:
    Zip code:

    If I hard code for values of and Zip, they appear in the email. It seems therefore that session variables are not available at the email_sub.php page.

    If anyone can point me in the right direction for a fix, I'd be very happy to suggestions.

    email_collect.php

    <? php require_once('Connections/connMan.php');? >
    <? PHP
    session_start();
    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    $theValue = (! get_magic_quotes_gpc())? addslashes ($TheValue): $theValue;

    Switch ($theType) {}
    case 'text ':
    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
    break;
    case "double":
    $theValue = ($theValue! = "")? « " ». doubleVal ($TheValue). "" "": "NULL";
    break;
    case "date":
    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
    break;
    case "set":
    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
    break;
    }
    Return $theValue;
    }

    $editFormAction = $_SERVER ['PHP_SELF'];
    If (isset {}
    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}
    $email = $HTTP_POST_VARS ['email'];
    session_register ("email");
    $zipcode = $HTTP_POST_VARS ["zipcode"];
    session_register ("zipcode");
    $insertSQL = sprintf ("INSERT INTO email_list (e-mail, postal code) VALUES (%s, %s)," ")
    GetSQLValueString ($_POST ['email'], "text").
    GetSQLValueString ($_POST ['PostalCode'], "int"));

    @mysql_select_db ($database_connMan, $connMan);
    $Result1 = mysql_query ($insertSQL, $connMan) or die (mysql_error ());

    $insertGoTo = "email_sub.php";
    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $insertGoTo));
    }

    @mysql_select_db ($database_connMan, $connMan);
    $query_rsEmailer = "SELECT * from email_list";
    $rsEmailer = mysql_query ($query_rsEmailer, $connMan) or die (mysql_error ());
    $row_rsEmailer = mysql_fetch_assoc ($rsEmailer);
    $totalRows_rsEmailer = mysql_num_rows ($rsEmailer);
    ? >
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
    < html >
    < head >
    < title > em touch all the Camps of Baseball < /title >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    < link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
    < script type = "text/JavaScript" >
    <!--
    function MM_findObj (n, d) {//v4.01
    var p, i, x;  if(!d) d = document; If ((p = n.IndexOf ("?")) > 0 & & parent.frames.length) {}
    d = parent.frames [n.Substring(p+1)] .document; n = n.Substring (0, p) ;}
    If (!) () x = d [n]) & & copyrights) x = d.all [n]; for (i = 0;! x & & i < d.forms.length; i ++) x = d.forms [i] [n];
    for (i = 0;! x & & d.layers & & I < d.layers.length; i ++) x = MM_findObj (n, d.layers [i] .document);
    If (! x & & d.getElementById) x = d.getElementById (n); Return x;
    }

    function MM_validateForm() {//v4.0
    var i, p, q, n, test, num, min, max, errors = ", args = MM_validateForm.arguments;
    for (i = 0; I <(args.length-2); I += 3) {test = args [i + 2]; val = MM_findObj(args[i]);
    If (val) {n = val.name; if ((val=val.value)! = "") {}}
    If (test.indexOf ('isEmail')! =-1) {p = val.indexOf (' @');}
    If (p < 1 | p ==(val.length-1)) errors +='-' + nm + "must contain an e-mail address. \n » ;
    } Else if (test! = 'R') {num = parseFloat (val);
    If (isNaN (val)) errors +='-' + nm + 'must contain a number. \n » ;
    If (test.indexOf ('inRange')! = - 1) {p = test.indexOf (': ');}
    min = test. Substring(8,p); Max = test. Substring (p + 1);
    If (num < min | max < num) errors +='-' + nm + must contain a number between "+ min +" and "+ max +".. " \n " ;
    }} ElseIf (test.charAt (0) == 'R') errors += '-' + nm + ' is required. \n " ; }
    } If (errors) alert ("the following error occurred: \n'+errors");
    document. MM_returnValue = (error == ");
    }
    ->
    < /script >
    < / head >

    < body >
    < are method = "post" name = "form1" action = "<?" PHP echo $editFormAction;? > ">"
    < table width = "325" align = "center" >
    < tr valign = 'of basic">
    < td colspan = "2" align = "left" >
    < h1 class = "subtitle" > join our Email list < / h1 >
    < p > please fill in boxes and click on & quot; Send. & quot; This information is kept secret and is intended for the exclusive touch of < strong > Hank Manning em all Camps of Baseball < facilities > in order to send you the latest happenings on our calendar.
    < /p >

    < p > < / p >
    < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" valign = "middle" nowrap > < p > E-mail: < /p > < table >
    < td align = "left" valign = "middle" > < input name = "email" type = "text" onBlur = "MM_validateForm ('email',", 'RisEmail'); " return document. MM_returnValue"size ="32"value ="Email address"> < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" valign = "middle" nowrap > < p > code postal: < /p > < table >
    < td align = "left" valign = "middle" > < input name = "PostalCode" type = "text" onBlur = "MM_validateForm ('postcode',", 'RisNum'); " return document. MM_returnValue' size = '32' value = 'postal Code' > < table >
    < /tr >
    < tr valign = 'of basic">
    < td align = "right" > < input type = "reset" name = "Reset2" value = "Reset" > < br >
    < input type = "submit" value = "send" > < table > ' "
    < td > < table >
    < /tr >
    < /table >
    < input type = "hidden" name = "MM_insert" value = "form1" >
    < / make >
    < p > < / p >
    < / body >
    < / html >
    <? PHP
    mysql_free_result() will free all memory associated with the result identifier result.

    mysql_free_result() only needs to be called if you are concerned about how much memory is used for queries that return large result sets. All associated result memory is automatically freed when the script is completed.
    mysql_free_result ($rsEmailer);
    ? >

    email_sub.php

    <? PHP session_start(); It connects to the existing session

    email sent

    / / [email protected] , [email protected]
    mail (' [email protected], [email protected]', "Join Email List", "from: $email\r\n Zip: $zipcode");
    ? >
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
    < html >
    < head >
    < title > em touch all the Camps of Baseball < /title >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    < link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
    < / head >

    < body >


    < table width = "280" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td colspan = "2" > < img src = "images/manning_logo.jpg" width = "426" height = "64" > < table > "
    < /tr >
    < tr valign = "top" >
    < td colspan = "2" > < p > < / p >
    < p align = "left" > thank you very much for sending your email and zip code. < /p >
    < table width = "350" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "69" > < p align = "right" > email: < /p > < table >
    < td width = "281" > < p align = "left" > <? PHP echo $_SESSION ['email'];? > < / p > < table >
    < /tr >
    < b >
    < td > < p align = 'right' > postal code: < /p > < table >
    < td > < p align = "left" > <? PHP echo $_SESSION ['postal code'];? > < / p > < table >
    < /tr >
    < / table > < p align = "left" > This information will be stored in our database exclusive use < facilities > < strong > Hank Manning em all the Baseball Camps Touch, which respects and protects your privacy. < /p >
    < table >
    < /tr >
    < b >
    < td width = "407" align = "left" > < a href = "javascript:window.close();" "> close this window < /a > < table >
    < td width = "19" > < p > < / p > < table >
    < /tr >
    < /table >
    < p > < / p >
    < p > < / p >
    <? PHP
    end the session so that I could see new variables because they are passed in the development
    session_destroy();? >
    < / body >
    < / html >

    sbudlong wrote:

    I made the change you suggested but the showsFrom:Zip still E-mail: without values for the variables. Is there a problem with the session?

    It seems that you do not use session variables when you send the mail:

    mail('[email protected], [email protected]',
    'Join Email List',
    "From: $email\r\n Zip: $zipcode");
    

    Change to this:

    mail('[email protected], [email protected]',
    'Join Email List',
    'From: ' . $_SESSION['email'] . "\r\n Zip: " .
    $_SESSION['zipcode']);
    
  • Creating a connection with Session variables

    Hey everybody! I've never used session variables so I'm not sure how they work, so I have a simple question for their use with a login form!

    I created a small form of login in the top right of my Web page, and what I want to do is when the user connects, the newspaper in the form of skins and is replaced by 'Welcome (username)' and stays that way while browsing the Web site. I think it's simple to do, ive just never used before

    Here is my login information for the code: (note this div tag is inside a table, do not know if it matters)

    <div id="login">
          <form ACTION="<?php echo $loginFormAction; ?>" id="form1" name="form1" method="POST">
            <label for="U_name"></label>
            Username
            <input name="U_name" type="text" id="U_name"/>
            <label for="U_Pass"></label>
            Password
            <input name="U_Pass" type="password" id="U_Pass"/>
            <input type="submit" name="login" id="login2" value="Login" class="loginb"/>
            <a href="register.php">        Register
            </a>
          </form>
        </div>
    

    Try this-

          if (!isset($_SESSION['MM_Username'])) { ?>

        


         

           
            Username
           
           
            Password
           
           
                    Register
           

         

       

    Welcome

  • Is connection with session variables secure?

    I use email as a primary key and reproducing $MM_Username when connecting with the authentication of the user.

    I of course also "password and $MM_UserGroup.»

    Is this system secure against piracy?

    I know he does not appear in the address bar, but it is possible to modify session variables using the code in the address bar or in any other way?

    I have configured groups of users for new records that only allows the account own display (page restrictions) and I don't want someone else under the law computer and freedoms (unless otherwise stated) in order to access the other folders.

    Thank you

    "RichardODreamweaver" wrote in message
    News:eutk47$GQA$1@forums. Macromedia.com...
    > Thanks for this Lionstone - I feel much happier.
    >
    > The validation code is in the page index with page restrictions on
    > everything
    > another connection failed.
    >
    > A concern is your point over https. I use a php on http site and
    > don't
    > don't know if it is possible to convert it to https
    >
    > I can only now count on our hosting provider!
    >

    The script on the server side you use has no effect on this.
    Your host likely provides HTTPS with a common certificate for annual fee.
    Do it some, some do not. most do these days, but you'll have to ask them. ;)

  • Problems with led variable removed from the database

    Hello

    I have problems with the following code, it draws on a database to add to a list later, player names, however outside of the statement where the name of the player are assigned they are not recognized i.e. the bits where I wrote [CODE] trace ("1these is the name of the player 1 is + player1Name"); [/ Code] etc. There are also 4 variables to do with a number of keys and as far as I can see that I am dealing with the same, declaring them upstairs, assigning them values and when I print them out later that they are beautiful, the only difference I see is the type of variable are about these things.

    I initialized the variables at the top, I tried to make it global, making [CODE] var player1Name: String; [/ Code], it seems a simple problem, but I can't understand it...

    Here's the relevant part of the code:

    [CODE]
    var stage3player1keyCount = 0;
    var stage3player2keyCount = 0;
    var stage3player3keyCount = 0;
    var stage3player4keyCount = 0;

    var player1Name ="";
    var player2Name ="";
    var player3Name ="";
    var player4Name ="";

    It reads in the current state keys players
    myDataP = new LoadVars();
    myDataP.load (" http://www.elementalive.net/keyDown.php");
    myDataP.onLoad = function() {}
    stage3player1keyCount = myDataP.info;
    trace (stage3player1keyCount + "is the number of player one keys");
    }

    myDataQ = new LoadVars();
    myDataQ.load (" http://www.elementalive.net/keyDown1.php");
    myDataQ.onLoad = function() {}
    stage3player2keyCount = myDataQ.info;

    trace (stage3player2keyCount + 'is the number of keys of Player 2');
    }
    myDataR = new LoadVars();
    myDataR.load (" http://www.elementalive.net/keyDown2.php");
    myDataR.onLoad = function() {}
    stage3player3keyCount = myDataR.info;
    trace (stage3player3keyCount + 'is the number of keys of player 3');
    }
    myDataS = new LoadVars();
    myDataS.load (" http://www.elementalive.net/keyDown3.php");
    myDataS.onLoad = function() {}
    stage3player4keyCount = myDataS.info;
    trace (stage3player4keyCount + 'is the number of keys of player 4');
    }
    This.stage3transferKeyList.SetStyle ("fontSize", "20");

    myDataT = new LoadVars();
    myDataT.load (" http://www.elementalive.net/wait1a.php");
    myDataT.onLoad = function() {}
    player1Name = myDataT.info;
    trace ("is the name of the player 1 s" + player1Name);
    printName (player1Name1, 1);
    }
    myDataU = new LoadVars();
    myDataU.load (" http://www.elementalive.net/wait1b.php");
    myDataU.onLoad = function() {}
    player2Name = myDataU.info;
    trace ("is the name of the Player 2 s" + player2Name);
    printName (player2Name, 2);
    }
    myDataV = new LoadVars();
    myDataV.load (" http://www.elementalive.net/wait1c.php");
    myDataV.onLoad = function() {}
    player3Name = myDataV.info;
    trace ("this is the name of the player 3 s" + player3Name);
    printName (player3Name, 3);
    }
    myDataW = new LoadVars();
    myDataW.load (" http://www.elementalive.net/wait1d.php");
    myDataW.onLoad = function() {}
    player4Name = myDataW.info;
    printName (player4Name, 4);
    trace ("is the name of the player 4 s" + player4Name);
    }

    trace ("1these is the name of the player 1 is + player1Name");
    trace ("1these is the name of Player 2's + player2Name");
    trace ("1these is the name of the player 3 is + player3Name");
    trace ("1these is the name of the player 4 is + player4Name");
    [/ CODE]

    Thanks for any help in advance, it is much needed and appreciated.

    Louise.

    I got it working! Thank you very much! You saved his life. It will take that I remember this problem... because I think he could source a few other hiccups throughout our game. You made my day!

    Thank you
    Louise

  • Big problem with the variable PATH approx. need help!

    Hello
    I had a problem with the PATH environment variable. Instead of updating client Informatica & server paths PATH env variable, I created new PATH env variable and to establish client & server paths and saved. When I revisited this PATH Env variable, I was shocked to see the content of the PATH variable. I have to set back the old values like windows OS, DB etc paths paths. Could someone tell me how to make or do I have to reinstall the OS, DB, etc. Am on WIndows server 2003.

    I saved my PATH before configuring Informatica. Here's what I had:

    Path = C:\oracle\10gclient\bin; C:\OracleBI\server\Bin; C:\OracleBI\web\bin; C:\OracleBI\web\catalogmanager; C:\OracleBI\SQLAnywhere; C:\OracleBAM\ClientForBAM\bin;%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem; C:\OracleBAM\BAM; C:\Informatica\PowerCenter8.1.1\client\bin

    The critical components of the OS dependent PATH is % SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem.

  • Problem with the variable moveIntoFolder_Task

    Hello

    I spend a lot of time already trying to find how I can put VM I found in moveIntoFolder_Task.

    What I'm doing:

    1 create a folder

    2. find a virtual machine provided in the text field

    3. move this virtual machine in the target folder.

    try {newFolder = parentFolder.createFolder ("test1") ;}

    {catch (Err)}

    findVM (vmname);

    function findVM (vmname) {}

    allVms = System.getModule("com.vmware.library.vc.folder").getAllVirtualMachinesByFolder (parentFolder);

    RET = null;  for (var i in allVms) {}

    If (allVms [i] .name == vmname) {ret = allVms [i];  break;  }} return ret;

    }



    var vms1 = new Array();

    vms1 = [];

    vms1 = vms1.push (ret);

    task = newFolder.moveIntoFolder_Task (vms1);

    var actionResult is System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd (task, progress, pollRate);.


    vms1 is VC:VirtualMachine type - but when I select this variable manually as an attribute - it works fine, I can't cmove VM in the target folder.

    When I find this virtual machine by using the function {} findVM I get following error:

    State: 'impossible', State of the business: "null" exception: ' cannot convert 1.0 [com.vmware.vmo.plugin.vi4.model.VimManagedEntity]


    Do you know how I can convert VM to data type VimManagedEntity?

    Hello

    You have no need to convert the VM VimManagedEntity.

    The problem is the next part of your code:

    vms1 = vms1.push(ret);
    task = newFolder.moveIntoFolder_Task(vms1);
    

    It seems that you expect the first line to push the object ret at vms1 table and return the array object, which then you pass as an argument to the method moveIntoFolder_Task().

    The problem is that the push() method will not return the table object, but the length of the array. So in fact you call moveIntoFolder_Task() method with the type argument number instead of argument array of virtual machines, and that's why you get this exception "cannot convert...". »

    So the solution is to replace:

    vms1 = vms1.push(ret);
    

    with a little (no assignment)

    vms1.push(ret);
    
  • Problem with bind variable and as operator usage

    Hi all

    I use JDeveloper Version - 11.1.2.4.39.64.36.1 .


    While implementing the search functionality in the hierarchical Viewer, I created a link in the underlying t variable, created to find, due east of the request-


    SELECT XxamAnkitObjects.ID,

    XxamAnkitObjects.OBJECT_NAME,

    XxamAnkitObjects.OBJECT_TYPE,

    XxamAnkitObjects.PARENT,

    XxamAnkitObjects.PARENT_ID,

    XxamAnkitObjects.PARENT_TYPE

    OF XXAM_ANKIT_OBJECTS XxamAnkitObjects

    WHERE object_name like ' %: o_name ".

    What I'm trying to accomplish here, it is that the input provided by the user in the search box must match with the object_name in the table.

    During execution, I met the following error (from newspapers WLS)-

    < QueryCollection > < buildResultSet > [598] java.sql.SQLException: try to set a parameter name that does not intervene in the SQL: o_name

    at oracle.jdbc.driver.OraclePreparedStatement.setNullAtName(OraclePreparedStatement.java:5384)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setNullAtName(OraclePreparedStatementWrapper.java:1451)

    The following query has been generated during the operation of a research-

    < ViewObjectImpl > < buildQuery > [593] SELECT XxamAnkitObjects.ID, XxamAnkitObjects.OBJECT_NAME, XxamAnkitObjects.OBJECT_TYPE, XxamAnkitObjects.PARENT, XxamAnkitObjects.PARENT_ID, XxamAnkitObjects.PARENT_TYPE XXAM_ANKIT_OBJECTS XxamAnkitObjects WHERE object_name like ' %: o_name ".

    < ViewObjectImpl > < bindParametersForCollection > [594] params for ViewObject Bind: [model.vo.ObjectNameSearch] AppModule.ObjectNameSearch1

    Advice kindly the way ahead.

    Best regards

    Ankit Gupta

    The problem is that you used quotes around the variable binding. Try

    SELECT XxamAnkitObjects.ID,
           XxamAnkitObjects.OBJECT_NAME,
           XxamAnkitObjects.OBJECT_TYPE,
           XxamAnkitObjects.PARENT,
           XxamAnkitObjects.PARENT_ID,
           XxamAnkitObjects.PARENT_TYPE
    FROM XXAM_ANKIT_OBJECTS XxamAnkitObjects
    WHERE object_name like '%' || :o_name || '%'
    

    A note: this type of query will do a full table scan, as the searches with wildcards to the left cannot use a regular index. If you have multiple lines, this will impact on the research persormance hughe!

    Timo

  • Problem with loading Variables from a text file

    Hello

    I'm quite a novice when it comes to scripts and I am struggling to achieve something quite simple. I want to have an external text file that will allow me to control the number of timeout that I reference in my code below. I need to be able to change this variable by editing a simple text file.

    var myTimer:Timer = new Timer(60000,1);
    

    I want to change the 60000 and 1.

    I followed what looks like a nice clean approach to this tutorial: http://www.designscripting.com/2012/01/as3-flash-loading-variables-from-a-text-file/

    However, when I'm stuck is how to reference my variable imported into the code. I tried 'name1' but it does not work. I get ' 1067: Implicit coercion of a value of a numeric type to a type unrelated string.' error '

    I'm an output:

    HTTP status = 0

    Data loaded

    Name1: undefined

    {name2: 1}

    http://screencast.com/t/gwD09jovIrb4

    I use CS5 and AS3.

    Thank you

    Dan

    I see nothing wrong with what you show, and when I try I get the following output...

    HTTP status = 0

    Data loaded

    Name1: 6000

    name2: 1

    The only thing I suspect for the moment is the data file itself.  I can reproduce the problem if I insert white space before this string, then make sure that the text string is not preceded by anything whatsoever.

  • Problem with shared Variables

    Hello

    I have a project that contains two VI: reading and writing, a shared library that contains a Boolean value (published on the network, type: Bool, alias uncheck).

    In Write.vi (diagram), there is a block button and a shared var node related.

    The same thing in Read.vi

    Aims to make the .exe working on another PC.

    In the project, I created the program installation and application.

    I try to run it on the second PC, but it does not work.

    Need help.

    AS2307,

    Are your read and write screws both on the same computer as shared variables of accommodation?  Both of these screws are working on the development of your PC and they work as executables on your development PC?

    It would be useful to know exactly what you did this works and what you have tried that does not work as it is has a few caveats with the help of executable actions variables as described in the article below.

    http://www.NI.com/white-paper/5715/en/

  • Problem with a variable in the SQL statement variable

    Hello

    I try the following query.

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + string + "");

    At this point, I get this error:

    Operands of + have illegal types "pointer to char" and "pointer to char".

    I tried this:

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + & cadena + "");

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password = '" + string + "'");

    Still having the same problem.

    It works fine if I do this.

    HSTMT = DBActivateSQL (hdbc, "SELECT UserLevel UserClass WHERE the password =" cadena' "");

    Where "cadena" is treated as a string.

    Any ideas?

    Thank you!

    The Visual Basic method to concatenate strings with the + operator does not work in C. You can use a number of ways to do this - here is just a sample:

    char string [256] = "SELECT UserLevel OF ClassUsers WHERE password = ';"

    HSTMT = DBActivateSQL (hdbc, strcat (string, String));

    JR

Maybe you are looking for

  • Why my iPod requires internet to play songs?

    I recently got an iPod 5 and I just discovered that he needs the internet to play a song. Problem is, I don't always have WiFi access when I want to listen to my music. It's quite frustrating because I have paid money to have these songs on demand, b

  • Where my Yahoo toolbar did disappear?

    My auto updated browser updated for Fire Fox 36 today. The Yahoo toolbar is now empty, except for the Yahoo Mail link. I tried to update the toolbar, but receive a failure message when I try. Is it possible to go back to Fire Fox 35?

  • Firefox tabs

    Since the last update, I can not open a new tab using the symbol + on the new tab or go "Open new tab" under file or sound control T.

  • Windows does not start?

    Hello I was wonderin if anyone can help me, when Windows XP tries to load, I get the following message: "We apologize for the inconvenience, but Windows did not start successfully. A recent hardware or software change might have caused this. "My opti

  • Satellite P300-133 - problem installing Win Xp

    Hello I have a problem installing win xp to Satellite p300-133.To resolve this problem, I have tried the solutions:switch to ahci mode in bios and incorporating storage drivers compatibility intel to the installation cd xp with nlite, but none of the