Use of boolean variables in BPEL switch statements

I have a workflow with a single boolean input parameter:
<element name="input" type="boolean"/>
I wish to use a switch statement within the workflow, based on the value of that boolean parameter.
When I use the following XPath expression:
bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")
I get the correct functionality, although I get the following BPEL compiler warning:
" [bpelc] [Warning ORABPEL-10078]: return value of this expression may not be a boolean
[bpelc] [Description]: in line 35 of "C:\eclipse\workspace\Boolean\Boolean.bpel", xpath expression "bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")" used in <switch> may not return boolean type value, the xpath engine would automatically try to convert the return value to boolean..
[bpelc] [Potential fix]: Please use one of the built-in boolean functions from xpath http://www.w3.org/TR/xpath#section-Boolean-Functions to convert the return value to boolean.."
However, the boolean functions referenced do not appear to be relevant to a variable which is already of a boolean type. If I attempt to use the boolean() function in my XPath expression, I get rid of the compiler error, but the workflow now does not work as required.
How can I get rid of the compiler warning and still get the required functionality, and/or am I doing the wrong thing?
I am currently running on JBoss, with BPEL release 2.1.2 [build #1226].
Thanks for any help or ideas.

Hi Marlon,
Thanks for that - I guess we have to accept the vagaries of XPath and the absence of type-checking for variables.
I hadn't fully understood until I started investigating that I can assign ANY string to variable of type xsd:boolean, which has been the cause of some of the confusion for me - whether that value is then considered true or false depends on how you write your test condition.
I tried with your condition, and it didn't seem to work (evaluated to true if the variable data was the string "true()", but otherwise it seemed to always evaluate to false.
I also tried the following:
condition="bpws:getVariableData('booleanVariable')=true()"
but that evaluates to true for any string of length > 0.
The only one I can get to consistently work is:
condition="bpws:getVariableData('booleanVariable')=string(true())"
although that means that variable data of "TRUE" will evaluate to false (may well be the correct behaviour, depending on how you're setting the boolean variable in the first place).

Similar Messages

  • How to start AND end a loop using a Boolean Button set to "Switch When Released" operation

    I have a Boolean button set to "Switch When Released" operation. When I press this button (now it's in the On state) I want to run a loop that does something continupously (for now, let's say it displays a simulated sine wave) until I press the button again (now the button is in the Off state) in which case, I want to end the loop. I am wiring my button to the loop condition that's set to "Continue if true" and have a "Wait Until Next ms Multiple" of 200 ms (I tried up to 500 ms). When I run the VI and press the button the first time, I see the sine wave displayed. But when I press the button again, nothing happens. It looks like it does not respond to the user interface. What's happening. What am I doing wrong? I'm using an Event Handler design pattern. I've also tried the Producer/Consumer (Events) design pattern. But I don't imagine the particular design pattern should make a difference. I've attached my code. Thanx.
    Fataneh
    Attachments:
    My_Event_Handler.vi ‏107 KB

    A simple solution would be to harness the timeout event, where you would put your data simulation. No need for parallel loops and local variables.
    The event timeout is starts out as  -1 (infinite) but pressing the start/stop button toggles between a 200ms and an infinite timout whenever it is pressed. Since the evet structure always runs, all other events (e.g. stop) are also serviced.
    Please ask if anything is not clear... Good luck!
    Message Edited by altenbach on 07-13-2005 04:20 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    My_Event_HandlerMOD_CA.vi ‏116 KB

  • Using a number variable in an SQL statement

    Hi,
    I am trying to use a variable in an sql statement and I have run into problems when the variable is a number. The following line of code works if the variable is a string but not if it is a number.
    "SELECT TOP 1 UUT_STATUS FROM UNIT_UUT_RESULT WHERE UnitID =  '" + Locals.LocalUnitID + "' ORDER BY START_DATE_TIME DESC"
    Is there a difference in the use of the single and double quotes and the + sign for number variables?
    Thanks
    Stuart
    Solved!
    Go to Solution.

    Hi Stuart,
    I am assuming that the UnitID is stored as a numeric in the database? If so, the proper SQL syntax for comparing with numerics should not use a single quote (or any quotes for that matter). The quotes are used only for strings.
    So you would want to use:
    "SELECT TOP 1 UUT_STATUS FROM UNIT_UUT_RESULT WHERE UnitID =  " + Locals.LocalUnitID + " ORDER BY START_DATE_TIME DESC"
    This is really more of an SQL question universal to all languages, not just TestStand.
    Here is an excellent resource that you can consult:
    http://www.w3schools.com/sql/sql_where.asp
    Jervin Justin
    NI TestStand Product Manager

  • Problem using a Boolean variable

    Greetings;
    I'm writing a game in which the player and 'enemies' fall off the screen when they 'die'. The problem is that I also want to constrain their  movement to within the screen boundaries whenever they have not been killed. To start  I thought I'd go into the class I wrote to handle the player falling off the screen when he's touched by an enemy and create a boolean variable so that Flash would know to let him fall off the screen when killed, but remain constrained on the screen until that point.The problem is that now the player stays on the screen even when I want him to fall off (i.e. after he's been hit).
    The class I wrote to handle the player dying is below, and the boolean variable is called 'playerBeenHit'. Since the player only gets a y acceleration when hit, I tried using the 'ay' variable to control the behavior but with the same results. In troubleshooting I tried to trace(playerBeenHit) on every frame and noticed it would go to 'true' and then set itself back to 'false' for three out of four readouts even after the player was hit. I'm not sure what I'm doing wrong here.
    Thanks,
    Jeremy
    package  jab.enemy
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.geom.ColorTransform;
        public class DieLikeAPlayer
            private var _clip1:MovieClip; // the 'player'
            private var _clip2:MovieClip; // the 'enemy' who kills the 'player' on contact.
            private var ay = 0; // vertical acceleration for falling off the screen.
            private var vx = 0; // horizontal initial velocity, 'knockback' from the impact.
            private var vy = 0; // vertical initial velocity, 'knockback' from the impact.
            private var playerBeenHit:Boolean = false;
            public function DieLikeAPlayer(clip1:MovieClip, clip2:MovieClip): void
                _clip1 = clip1;
                _clip2 = clip2;
                _clip1.stage.addEventListener(Event.ENTER_FRAME, onEnterFrame)
                function onEnterFrame(event:Event):void
                    if (_clip1.hitTestObject(_clip2)) // what happens when the player gets killed.
                        playerBeenHit= true;
                        ay = 3;
                        _clip1.scaleY = -Math.abs(_clip1.scaleY);
                        _clip1.alpha = 0.4;
                        _clip1.gotoAndStop(2);
                        vx = -0.2;
                        vy = 2;
                        _clip1.y += 5;
                        _clip1.rotation = -45
                    // adding y acceleration and x velocity (knockback) from being hit.
                    _clip1.x += vx;
                    _clip1.y += vy;
                    vy += ay;
                    if(playerBeenHit == false)//constrains the player from moving past the  bottom of the screen.
                         if(_clip1.y > 620)
                         {_clip1.y = 620;}
                    if (_clip1.y > 100000) // brings the player 'back to life' after falling 100,000 pixels.
                        ay = vx = vy = 0;
                        _clip1.alpha = 1;
                        _clip1.scaleY = Math.abs(_clip1.scaleY);
                        _clip1.rotation = 0;
                        _clip1.gotoAndStop(1);
                        _clip1.x = 480;
                        _clip1.y = 300;
                        playerBeenHit = 0;

    that shouldn't compile.  don't you see an error message about your boolean being assigned an int?  you are publishing for as3, correct?

  • USING MULTIPLE SELECT VARIABLE IN A SQL STATEMENT

    In HTMLDB, the value of the parameter of a multiple select box is colon delimited(ie P6_Name = Smith:Jones:Burke). Is there an easy way to use this parameter in a SQL statement?
    Example
    Select *
    from names
    where
    Name=P6_Name
    Select *
    from names
    where
    Name IN ('Smith','Jones','Burke')
    Thank you

    Thank you for your response! I'm an idiot. It didn't make sense to me because your talking about a <i>multi-select</i> variable and I was thinking about a <i>select-list</i> variable. My problem is that I need to assign a list of values to one select list item.
    <br>
    For example:
    <br>
    SELECT * FROM EMPLOYEE
    WHERE EMPLOYEE_TYPE IN ( :SELECT_LIST_RETURN_VALUE );
    <br><br>
    With the select list as
    <br><br>
    Display value = All Types, Some Types, One Specific Type<br>
    Return Value = (Type1, type2, type3), (type1, type2), (type3)
    <br><br>
    I've just started in all of this so I'd imagine that I'm probably going about it wrong.

  • How to use presentaion variable in the SQL statement

    Is there any special syntax to use a presentation variable in the SQL Statement?
    I am setting a presentation variable (Fscl_Qtr_Var)in the dashboard prompt.
    If i set the filter as ADD->VARIABLE->PRESENTATION, it shows the statement as 'Contract Request Fiscal Quarter is equal to / is in @{Fscl_Qtr_Var} '.
    And this works fine but when i convert this to SQL, it returns
    "Contract Request Date"."Contract Request Fiscal Quarter" = 'Fscl_Qtr_Var'
    And this does not work.It is not being set to the value in the prompt.
    I need to combine this condition with other conditions in the SQL Statement. Any help is appreciated. Thanks

    Try this: '@{Fscl_Qtr_Var}'

  • How to use bind variable in this select statement

    Hi,
    I have created this procedure where table name and fieldname is variable as they vary, therefore i passed them as parameter. This procedure will trim leading (.) if first five char is '.THE''. The procedure performs the required task. I want to make select statement with bind variable is there any possibility to use a bind variable in this select statement.
    the procedure is given below:
    create or replace procedure test(tablename in varchar2, fieldname IN varchar2)
    authid current_user
    is
    type poicurtype is ref cursor;
    poi_cur poicurtype;
    sqlst varchar2(250);
    THEVALUE NUMBER;
    begin
         sqlst:='SELECT EMPNO FROM '||TABLENAME||' WHERE SUBSTR('||FIELDNAME||',1,5)=''.THE ''';
         DBMS_OUTPUT.PUT_LINE(SQLST);
    OPEN POI_CUR FOR SQLST ;
    LOOP
         FETCH POI_CUR INTO THEVALUE;
              EXIT WHEN POI_CUR%NOTFOUND;
              DBMS_OUTPUT.PUT_LINE(THEVALUE);
              SQLST:='UPDATE '||TABLENAME|| ' SET '||FIELDNAME||'=LTRIM('||FIELDNAME||',''.'')';
              SQLST:=SQLST|| ' WHERE EMPNO=:X';
              DBMS_OUTPUT.PUT_LINE(SQLST);
                   EXECUTE IMMEDIATE SQLST USING THEVALUE;
    END LOOP;
    COMMIT;
    END TEST;
    Best Regards,

    So you want to amend each row individually? Is there some reason you're trying to make this procedure run as slow as possible?
    create or replace procedure test (tablename in varchar2, fieldname in varchar2)
    authid current_user
    is
       sqlst      varchar2 (250);
       thevalue   number := 1234;
    begin
       sqlst := 'update ' || tablename || ' set ' || fieldname || '= ltrim(' || fieldname || ',''.'')  where substr(' || fieldname
          || ',1,5) = ''.THE ''';
       dbms_output.put_line (sqlst);
       execute immediate sqlst;
    end test;will update every row that satisfies the criteria in a single statement. If there are 10 rows that start with '.THE ' then it will update 10 rows.

  • Continue in a switch statement

    What is the difference between using unlabelled continue and break in a switch statement?
    Looks like there is the same effect but I didn't found anything about using continue in switch in any documentation.
    Here's a typical explanation of using switch statement:
    "If the condition in a +switch statement+ matches a case constant, execution will run through all code in the +switch+ following the matching case statement until a +break statement+ or the end of the +switch statement+ is
    encountered. In other words, the matching case is just the entry point into the case block, but *unless there's a break statement*, the matching case is not the only case code that runs"
    Is it a good practise to use continue instead of break in such case?

    Books are right again :))
    Thanks everybody who wrote here.
    As I found out continue is only for use in the loop statements. I just use continue inside both for and switch statements and that's why I thought that it's appropriate to use it inside switch. No way!! In this way continue will affect only loop, not switch statement.
    For example:
    class BreakTest {
         public static void main(String[] args) {
              BreakTest br = new BreakTest();
              br.testContinue();
              br.testBreak();
         public void testContinue() {
              int[] int_arr = { 0, 0, 0, 0, 1, 0, 0 };
              int count_in_switch = 0;
              int count_in_for = 0;
              for (int a : int_arr) {
                   switch (a) {
                   case 0:
                        continue;
                   default:
                        count_in_switch++;
                   count_in_for++;
              System.out.println("count_in_switch=" + count_in_switch
                        + " count_in_for=" + count_in_for);
         public void testBreak() {
              int[] int_arr = { 0, 0, 0, 0, 1, 0, 0 };
              int count_in_switch = 0, count_in_for = 0;
              for (int a : int_arr) {
                   switch (a) {
                   case 0:
                        break;
                   default:
                        count_in_switch++;
                   count_in_for++;
              System.out.println("count_in_switch=" + count_in_switch
                        + " count_in_for=" + count_in_for);
    count_in_switch=1 count_in_for=*1*
    count_in_switch=1 count_in_for=*7*
    In case of using continue you won't get to count_in_for++; - you'll jump to the next iteration of for loop.
    In case of using break you'll go out of switch and go to next statement, that goes after switch block

  • Switch statement loops

    Hi,
    I was just wondering if there is any way to make a switch statement loop back on itself, for example if you want to use the default part of the switch statement check the validity of the inputs themselves and ask for a replacement input should the data not meet the criteria?
    Thanks,
    Luke.

    I was just wondering if there is any way to make a
    switch statement loop back on itself, for example if
    you want to use the default part of the switch
    statement check the validity of the inputs themselves
    and ask for a replacement input should the data not
    meet the criteria?switch statement is not supposed to loop. So, you would have to make use of a for or while with some criterion determined by the execution of the switch statement.

  • Compiler error when useing switch statements in an inner class

    I have defined several constants in a class and want to use this constans also in an inner class.
    All the constants are defined as private static final int.
    All works fine except when useing the switch statement in the inner class. I get the compiler error ""constant expression required". If I change the definition from private static final to protected static final it works, but why?
    What's the difference?
    Look at an example:
    public class Switchtest
       private static final int AA = 0;     
       protected static final int BB = 1;     
       private static int i = 0;
       public Switchtest()
          i = 0; // <- OK
          switch(i)
             case AA: break; //<- OK, funny no problem
             case BB: break; //<- OK
             default: break;
      private class InnerClass
          public InnerClass()
             i = 0; // <- OK: is accessible
             if (AA == i) // <- OK: AA is seen by the inner class; i  is also accessible
                i = AA + 1;
             switch(i)
                case AA: break; // <- STRANGE?! Fail: Constant expression required
                case BB: break; // <- OK
                default: break;
    }Thank's a lot for an explanation.

    Just a though:
    Maybe some subclass of Switchtest could decalare its own variable AA that is not final, but it can not declare its own BB because it is visible from the superclass. Therefore the compiler can not know for sure that AA is final.

  • Using a Switch statement for Infix to Prefix Expressions

    I am stuck on the numeric and operator portion of the switch statement...I have the problem also figured out in an if/else if statement and it works fine, but the requirements were for the following algorithm:
    while not end of expression
    switch next token of expression
    case space:
    case left parenthesis:
    skip it
    case numeric:
    push the string onto the stack of operands
    case operator:
    push the operator onto the stack of operators
    case right parenthesis:
    pop two operands from operand stack
    pop one operator from operator stack
    form a string onto operand stack
    push the string onto operand stack
    pop the final result off the operand stack
    I know that typically case/switch statement's can only be done via char and int's. As I said I am stuck and hoping to get some pointers. This is for a homework assignment but I am really hoping for a few pointers. I am using a linked stack class as that was also the requirements. Here is the code that I have:
       import java.io.*;
       import java.util.*;
       import java.lang.*;
    /*--------------------------- PUBLIC CLASS INFIXTOPREFIX --------------------------------------*/
    /*-------------------------- INFIX TO PREFIX EXPRESSIONS --------------------------------------*/
        public class infixToPrefix {
          private static LinkedStack operators = new LinkedStack();
          private static LinkedStack operands = new LinkedStack();
            // Class variable for keyboard input
          private static BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
             // Repeatedly reads in infix expressions and evaluates them
           public static void main(String[] args) throws IOException {
          // variables
             String expression, response = "y";
          // obtain input of infix expression from user
             while (response.charAt(0) == 'y') {
                System.out.println("Enter a parenthesized infix expression.");          // prompt the user
                System.out.println("Example: ( ( 13 + 2 ) * ( 10 + ( 8 / 3 ) ) )");
                System.out.print("Or as: ((13+2)*(10+(8/3))):  ");
                expression = stdin.readLine();     // read input from the user
             // output prefix expression and ask user if they would like to continue          
                System.out.println("The Prefix expression is: " + prefix(expression));     // output expression
                System.out.println("Evaluate another? y or n: ");          // check with user for anymore expressions
                response = stdin.readLine();     // read input from user
                if (response.charAt(0) == 'n') {          // is user chooses n, output the statement
                   System.out.println("Thank you and have a great day!");
                }     // end if statement
             }     // end while statement
          }     // end method main
       /*------------- CONVERSION OF AN INFIX EXPRESSION TO A PREFIX EXPRESSION ------------*/ 
       /*--------------------------- USING A SWITCH STATEMENT ------------------------------*/
           private static String prefix(String expression) {
                // variables
             String symbol, operandA, operandB, operator, stringA, outcome;
               // initialize tokenizer
             StringTokenizer tokenizer = new StringTokenizer(expression, " +-*/() ", true);     
             while (tokenizer.hasMoreTokens()) {
                symbol = tokenizer.nextToken();     // initialize symbol     
                switch (expression) {
                   case ' ':
                      break;     // accounting for spaces
                   case '(':
                      break;     // skipping the left parenthesis
                   case (Character.isDigit(symbol.charAt(0))):      // case numeric
                      operands.push(symbol);                                   // push the string onto the stack of operands
                      break;
                   case (!symbol.equals(" ") && !symbol.equals("(")):     // case operator
                      operators.push(symbol);                                             // push the operator onto the stack of operators
                      break;
                   case ')':
                      operandA = (String)operands.pop();     // pop off first operand
                      operandB = (String)operands.pop();     // pop off second operand
                      operator = (String)operators.pop();     // pop off operator
                      stringA = operator + " " + operandB + " " + operandA;          // form the new string
                      operands.push(stringA);
                      break;
                }     // end switch statement
             }     // end while statement
             outcome = (String)operands.pop();     // pop off the outcome
             return outcome;     // return outcome
          }     // end method prefix
       }     // end class infixToPrefixAny help would be greatly appreciated!

    so, i did what flounder suggested:
             char e = expression.charAt(0);
             while (tokenizer.hasMoreTokens()) {
                symbol = tokenizer.nextToken();     // initialize symbol     
                switch (e) {
                   case ' ':
                      break;     // accounting for spaces
                   case '(':
                      break;     // skipping the left parenthesis
                   case '0':
                   case '1':
                   case '2':
                   case '3':
                   case '4':
                   case '5':
                   case '6':
                   case '7':
                   case '8':
                   case '9':
                      operands.push(symbol);     // push the string onto the stack of operands
                      break;                               // case numeric
                   case '+':
                   case '-':
                   case '*':
                   case '/':
                      operators.push(symbol);     // push the operator onto the stack of operators
                      break;                               // case operator
                   case ')':
                      operandA = (String)operands.pop();     // pop off first operand
                      operandB = (String)operands.pop();     // pop off second operand
                      operator = (String)operators.pop();     // pop off operator
                      stringA = operator + " " + operandB + " " + operandA;          // form the new string
                      operands.push(stringA);
                      break;
                   default:
                }     // end switch statement
             }     // end while statement
             outcome = (String)operands.pop();     // pop off the outcome
             return outcome;     // return outcomeafter this, I am able to compile the code free of errors and I am able to enter the infix expression, however, the moment enter is hit it provides the following errors:
    Exception in thread "main" java.lang.NullPointerException
         at LinkedStack$Node.access$100(LinkedStack.java:11)
         at LinkedStack.pop(LinkedStack.java:44)
         at infixToPrefix.prefix(infixToPrefix.java:119)
         at infixToPrefix.main(infixToPrefix.java:59)
    Any ideas as to why? I am still looking through seeing if I can't figure it out, but any suggestions? Here is the linked stack code:
        public class LinkedStack {
       /*--------------- LINKED LIST NODE ---------------*/
           private class Node {
             private Object data;
             private Node previous;
          }     // end class node
       /*--------------  VARIABLES --------------*/
          private Node top;
      /*-- Push Method: pushes object onto LinkedStack --*/     
           public void push(Object data) {
             Node newTop = new Node();
             newTop.data = data;
             newTop.previous = top;
             top = newTop;
          }     // end function push
       /*--- Pop Method: pop obejct off of LinkedStack ---*/
           public Object pop()      {
             Object data = top.data;
             top = top.previous;
             return data;
          }     // end function pop
       } // end class linked stackEdited by: drmsndrgns on Mar 12, 2008 8:10 AM
    Edited by: drmsndrgns on Mar 12, 2008 8:14 AM
    Edited by: drmsndrgns on Mar 12, 2008 8:26 AM

  • Switch statement and case variables

    Since constant variables do not have to be initialized when declared, they could be initialized later based on conditional logic and used to make the Switch statement more useful by using them as case labels. Well, sounds good in theory but I can't find anyway to make it work.
    I can't even get this to compile when the value of the case label is obvious at compile time :
    public class Switchtest
    public static void main(String[] args)
    int test = 0;
    final int x;
    x = 1;
    switch (test)
    case x: System.out.println("case x " );break;
    default: System.out.println("Default ");break;
    It gives an error about expecting x to be constant. I've tried static initializer blocks, etc. Is there anyway to have the case label variables initialized at runtime to make the Switch statement more useful?

    If jvm can use a hashtable for a switch statement. This hashtable is as constant as the compiled code, i.e., it can be defined at compile- time and it con not be modified runtime. Therefore a switch- case construction is faster than an else-if construction. But the strength of else- if is that it is more flexible. If you want to test on multiple variable values, you must use else-if
    class a
       public int method()
          int val = (int)(Math.random()*3);
          int x;
          if(val == 0)
             x = 1;
          else if(val == 1)
             x = 2;
          else
             x = 3;
          return x;
    class b
       public int method()
          int val = (int)(Math.random()*3);
          int x;
          switch (val)
             case 0:
                x = 1;
                break;
             case 1:
                x = 2;
                break;
             default:
                x = 3;
                break;
          return x;
    }b is bigger than a, but also faster. The technique used in a is more flexible, but b uses O(1) time where a uses O(n). (where n is the number of cases/else-ifs)

  • HELP -menu using a switch statement

    Hello to all. I'm new to the Java world, but currently taking my first Java class online. Not sure if this is the right place, but I need some help. In short I need to write a program that gives the user a menu to chose from using a switch statement. The switch statement should include a while statement so the user can make more than one selection on the menu and provide an option to exit the program.
    With in the program I am to give an output of all counting numbers (6 numbers per line).
    Can anyone help me with this?? If I'm not asking the right question please let me know or point me in the direction that can help me out.
    Thanks in advance.
    Here is what I have so far:
    import java.util.*;
    public class DoWhileDemo
         public static void main(String[] args)
              int count, number;
              System.out.println("Enter a number");
              Scanner keyboard = new Scanner (System.in);
              number = keyboard.nextInt();
              count = number;
              do
                   System.out.print(count +",");
                   count++;
              }while (count <= 32);
              System.out.println();
              System.out.println("Buckle my shoe.");
    }

    Thanks for the reply. I will tk a look at the link that was provided. However, I have started working on the problem, but can't get the 6 numbers per line. I am trying to figure out the problem in parts. Right now I'm working on the numbers, then the menu, and so on.
    Should I tk this approach or another?
    Again, thanks for the reply.

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • Using Variables in a select statement through a Database Adapter

    I was wondering how I reference a variable in a select statement through a Database Adapter.
    Ex.
    1. I have a global variable that stores an employee number
    2. I want to select an SSN # from a table based on an employee #
    variable.
    select ssn from emp where ssn = :input_variable - ????
    - how do i reference the variable - I am getting a 'missing IN or OUT parameter error?
    Any advice is much appreciated.
    ~Thanks

    I'm just wondering if anyone knows a work around so that I might be able to store a Table's FIELD name in a variable or an array[] so that I can do a query based on the decision of a loop without having to code 10 IF/ELSE statements.For instance, although the above code will not work, this code, although quite lengthy, does:
    If DataGrid1.SelStartCol = 0 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES__PUR_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 1 Then
    Adodc1.RecordSource = "Select * from tblReservation order by VENDOR"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 2 Then
    Adodc1.RecordSource = "Select * from tblReservation order by VEN_LOC"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 3 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_TYPE"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 4 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_FROM_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 5 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_TO_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 6 Then
    Adodc1.RecordSource = "Select * from tblReservation order by MISC_ADJ"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 7 Then
    Adodc1.RecordSource = "Select * from tblReservation order by STATE_TAX"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 8 Then
    Adodc1.RecordSource = "Select * from tblReservation order by LOC_CHARGE"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 9 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_ID"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 10 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_OP"
    Adodc1.Refresh
    End If
    Do you see where i'm going with this?
    I simple want to use a variable in the "select * from <Table> Order by <Field>"

Maybe you are looking for

  • HELP: AVCHD Log & Transfer idle problem for iMac 27"

    I just bought an Apple iMac 27" but I cannot do a Log & Transfer. I used the same SDHC card that I log & transfer succesfully in the old 24" iMac. But when I did a Log & Transfer in the new 27" iMac, I got into this: 1) FCE4 can detect the card & sho

  • Tired of graphical corruption resulting in depth changing to 256 colours.

    When will the bug in the Boot Camp WinXP ATI Radeon 2600 HD Pro (mid-2007 24" 2.8GHz iMac that causes graphical corruption resulting in colour depth switching to 256 colours be fixed? This happens after a random time running WinXP (from mere minutes

  • Alternative for HELPSCREEN_NA_CREATE

    Hi I am working on a update from 4.0b to 4.7 , on performing extended check on a program the FM HELPSCREEN_NA_CREATE is said to be obsolete , what could be the alternative for it. Regards Arun

  • Set path to folder?  (Save cURL to folder) [Applescript]

    I need to save a cURled file to a certain spot.  I'm really bad at this, so I'm probably missing something obvious.  here is my script: set username to short user name of (system info) set targetpath to POSIX path of (path to "Macintosh HD:Users:" &

  • How to verify to use apps

    I got my email on my computer but when I click on verify nothing happens and I can not open any apps on my i pad