Using menu ring to select data out of database with SQL

I have a database setup with two tables and six columns of data. One of the columns contains an array of data. I would like to be able to read the data out with two ring controls. One ring to select the table and the other to select certain rows of data based on the value in one row. I want the data charts to update automatically inside a loop when the ring values are changed. I started by modifying the playback(fetching) example. The problem is when I change the menu item, I am not closing the first connection before opening a new one. Should I be using the running stored procedures with parameters method to accomplish this task?? I suppose all of the data could be read and then sorted out of the result.
Attachments:
myPlayback_rev2.vi ‏120 KB

unclebump,
There are two possible solutions. If you are using LabVIEW 6.0.x, then you will need to put a while loop around all of your program and poll to see if the values of the ring controls have changed (can be done with a shift register). If nothing has changed, then have a case structure that does nothing. If the values have changed, then get the new data.
If you are using LabVIEW 6.1, then you can check for a value changed event on the ring controls. Everything else from the 6.0.x version from above would be the same. This eliminates the polling which reduces processor use.
Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask

Similar Messages

  • Using a menu ring to select DAQ device channel and indicator

    Hi,
    New user here. I am using the DAQ assistant with multiple analog inputs. I would like the front panel to have a menu ring where the user can select which channels are to be active. Also, this corresponds to a single graphical indicator. 
    Currently I have a VI that displays all channels each with its own indicator. I want to simplify the front panel so that a user can simply use a menu ring to select and focus on what he/she is interested in. Is it possible to use the Select Signals Express VI to implement this?
    Thank you!

    Drop the DAQ Assistant or convert it to regular DAQmx functions. The physical channel control does all that. Just look at the shipping examples.

  • Select data from different database

    hi,
    may I know how to select data from different database?
    for example,
    I've 2 databases, OracleDB and OracleAR
    Connect with OracleAR in SQL*Plus
    select * from OracleDB.TableName
    does Oracle support this kind of query?
    how can I retrieve data from other database while im connecting with
    other database?

    Hi,
    Yes, it's possible. No, your syntax won't work.
    First of all you have to define a DATABASE LINK inside the DB where you are already connected (in this case OracleAR). Read docs how to do that.
    Second thing is the query. It will look like
    SELECT * from TableName@<NameOfDatabaseLink>Greetings,
    Guido

  • Why can't I use iCloud for exchange of data - like I could with MobileMe?

    Why can't I use iCloud for exchange of data - like I could with MobileMe?
    Oder auf Deutsch, warum kann ich keine Daten mehr in iCloud speichern bzw. zum Austausch bereitstellen, wie das bei MobileMe noch ging?
    Danke für die Hilfe
    Thanx in advance!

    The purpose of iCloud is to sync data between your devices.
    There is no "web address" to your files and no way to "share" them with others (except photos).

  • Comparing data in the database with the input text

    hi there i have problem with the comparing data in the database with the input text. here is the piece of code of mine:
    //declaration
    datasourcedb.connect();
    String stcode = req.getParameter("txtCode");
    ResultSet rs = null;
    String action = req.getParameter("action");
    ResultSet portquery = null;
    if (action.equals("SELL"))
    -->portquery = datasourcedb.query("SELECT stockcode FROM portfolio where stockcode =\'"+ stcode + "\'");
    -->portquery.next();
    -->if((portquery.wasNull()) == true)
    disp = req.getRequestDispatcher("error.jsp"); }
    else */
    Status = "Sell";
    datasourcedb.close();
    with the code that i marked with --> it doesnt work since i have to compare the input text stcode with stockcode in the db. could anyone tell me how to compare it?
    regards
    virginia

    i have try to change into this code:
    if (action.equals("SELL"))
    portquery = datasourcedb.query("SELECT distinct stockcode FROM portfolio where stockcode =\'"+ stcode + "\' + and userName = \'"+ user + "\'");
    if(portquery.next()) {
    Status = "Sell";}
    else {               
    disp = req.getRequestDispatcher("error.jsp");
    but so far the coding doesnt give any result.... could anyone help me? since the coding does not reach status n the disp

  • How to use a ring to select axes of an xy graph

    Hello,
    I'm a relatively new user to Labview and so far have found it comepletely stupifying.  I am trying to use drop down menus (ring) to select the axes of an xy-graph.  I'm using the Daq Assistant to gather my signal which consist of three parts (load, displacement, strain). I would like the ability to plot any of the inputs against eachother as well as in time simply by changing the value of the ring.  Thus far I have the ability to plot the signals against eachother using indexed arrays, but not with time.  When I look at the data from my index array, there is no time stamp...Is there any way to do this? It's probably a simple task, but I'm sick of flipping through menus of icons to find it.  Here is a screen shot of what I'm hung up on except instead of the signal simulation I have a DAQ assistant.
    Thanks in advance.
    Jon Messier
    Attachments:
    xy graph axes control.JPG ‏34 KB

    You removed all of the timestamps by your conversion of the dynamic data to a 2D dbl array. The 2D dbl array is just the Y arrays of your acquisition. If you don't want to use the dynamic data, then convert it to a 1D Waveform array. The waveform data type is a special cluster that contains the Y array, t0, and dt. The dynamic data type has this information as well.

  • Fastest way to extract data out of xml with following constraints.

    10.2 on linux
    xml files are being dropped off into a queue. in the queue the documents must be stored as clobs so that control can be given back to the client as soon as possible.
    once in the queue we would like to extract all the data from the xml and place it in relational staging tables. the data is then moved from these tables into production.
    the only thing that can change is what happens between the queue and the staging tables. currently i am just using extract statements to pull the data out of the clob.
    the files are around 20mb and currently take over 20 minutes to process which is way too long.
    i looked at DBMS_XMLSTORE but we cannot alter the xml format.
    i looked at Oracle text but if i understand it correctly, we would have to rebuild the entire index after every new queue item.
    i have very little experience with xml so i want to make sure i know all my options.
    from what i can tell my only option is to take the clob and let xml db parse it into o-r tables. ...but even that seems like a horrible waste.
    is there anything else i can do? any pointers?
    thanks for any help!
    by the way...this forum has been of great help. my only problem is that i don't seem to ask the right questions at the right time.

    Chris
    Most people seem to find that allow XML DB to persist the XML using the object based storage and nested tables and then using insert as select operations is the most effective way to do what you want. There are a number of threads on how to best do this..
    The question to ask is do you really need the relational staging tables. If you read through the forum you'll see that once the XML has been persisted as objects, and the XML objects have been stored using a nested table storage models you can easily create relational views to represent the staging tables.
    This process will work very well if there are no updates to the staging tables. Effectively you will process the XML once, when you insert into the Schema based tables, and then use the relational views as the source for the migration from staging to production.
    If you haven't already done so, reading the following posts will help you with this
    XMLType column based on XML Schema: several questions
    http://forums.oracle.com/forums/thread.jspa?threadID=347820&tstart=0
    problem with sql/xml
    XML Query Performance on Nested Tables
    Basically you'll need an XML Schema that describes your XML and you'll need to set up nested table storage for each of the collections in your XML Schema in order to the required performance when using the views.
    The easiest way will be to use the default table that is creted when registering the XML Schema and the annotation xdb:storeVarrayAsTable="true" and then ensure that you sequence each collection correctly.

  • 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>"

  • Select data from another database

    Hi,
    Is it possible to retrieve data from a table from another database?
    For instance, I have two databases db_1 and db_2
    I login to the database db_1 using
    sqlplus username/psw@db1
    and to the database db_2 using
    sqlplus username/psw@db2
    In SQL> db1 I would like to use select statement from a table in the db2. Is it possible?
    Another question:
    I have two tablespaces TP1 and TP2 in the database db1
    The TP1 is my default tablespace.
    Can I switch from TP1 to TP2 tablespace in the sqlplus?
    If not, how can I select all tables obtained in the TP2? Or how can I select data from a table in the TP2?
    Thanks

    I don't know how to create a db link.<br>
    SQL Reference Guide - CREATE DATABASE LINK<br>
    There are some examples in the doc above.<br>
    <br>
    What about if db1 and db2 have the same table name?<br>No problem, exactly like when you have two same table name accross two schemas on same database. The table suffixed by the dblink name come from the other schema of other database (schema which you use to connect through the dblink to the other database).<br>
    <br>
    Nicolas.

  • SELECT data from two databases

    I have two databases that I need to select data from in a
    single SELECT. Using DWs Advanced window for creating the select I
    don't see any way to select more than 1 Connection. Both databases
    have unique user and passwords but reside on the same server. Any
    idea how I can write a single SELECT to get data from both dbs. I
    assumed it would be similar to selecting data from multiple tables
    within the same db but the connection part is stumping me. Any
    ideas would be greatly appreciated.

    TouchstonePress wrote:
    > Page 48, Developing a Web Database Application . . .
    speaks about making a
    > database with two related TABLES each with the same
    PRIMARY KEY column with
    > which to identify a customer using their unique number.
    That's the basic technique for joining two tables in the same
    database.
    The original poster has tables in different databases that
    have
    different user accounts and passwords.
    Although it's possible to join two databases, you cannot do
    it unless
    you have one user account with the same privileges on both
    databases.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Getting data out of Oracle to SQL Server 2005

    Hello,
    I am new in Oracle and I have this question.
    I need to transfer lots of data frequently at day from a large Oracle DB to a SQL Server 2005 Database.
    Could you tell me what tools (including PL/SQL) ORACLE offers to reach this goal?
    *.Dat files are still a way to perform this job or other method more performance (quickly and efficiently) are available?
    Using MS SSIS is better ?
    Thank for your help

    I've done getting data out of Oracle to MS Access DB using heterogenous servicing.I hope that that would be the best way for your case too..
    Check this out.
    http://www.datadirect.com/developer/odbc/oracle_heterogeneous/index.ssp
    Regards,
    Bhagat

  • How to get data out of quiz with POST or GET?

    Seems like a simple question, but I haven't yet been able to
    capture the results of a quiz yet. I want to fetch the POST data
    from the quiz in PHP using something like:
    $quizTotal = $_POST['total'];
    $quizCorrect = $_POST['correct'];
    Alternatively, I can use ASP:
    quizTotal = request.form("total")
    quizCorrect = request.form("correct")
    But I still haven't been able to get ANY data out of a quiz.
    HOW?

    benhenny,
    Are you trying to capture data locally and send to a
    server-side script - or
    use the existing LMS functionality to capture the post (for
    AICC) in a PHP
    script?
    Regards,
    Andrew

  • Getting just the date out of MySQL with CF8

    I have a mysql table that includes a column 'intakeDate' set to the data type of DATE. When entering, it creates a record of YYYY-MM-DD. When I query the database with Coldfusion for the date of 2004-06-10, I get the result of {ts '2004-06-10 00:00:00'}. Fine and dandy for people in my timezone, but I found that if my users are in any timezone west of Eastern, the date slips back to the day before and their 'time stamp' is 23:00:00 (or appropriate offset). How can I get Coldfusion to just return to my Flex application only the value inside the table and not its ts version with midnight attached. Again, the table is set to only DATE and not TIMESTAMP or DATETIME so there are no time values entered. Also, mind you that this is being sent to a Flex application's manage class. Since some of this information deals with shot records and medical records, date is very important.
    I tried the MySQL function of DATE but it doesn't change the output.
    <cfquery name="list" datasource="#request.dsn#">
        Select DATE(intakeDate) as intakeDate FROM pets
    </cfquery>
    RESULTS IN:
    {ts '2010-12-29 00:00:00'}   {ts '2010-11-18 00:00:00'}    {ts '2009-12-28 00:00:00'}   {ts '2009-10-03 00:00:00'}   {ts '2009-07-13 00:00:00'}   {ts '2009-10-03 00:00:00'}    {ts '2008-06-01 00:00:00'}   {ts '2008-02-09 00:00:00'}   {ts '2003-03-01 00:00:00'}
    {ts '2004-06-10 00:00:00'}   {ts '2003-03-01 00:00:00'}    {ts '2004-06-01 00:00:00'}   {ts '2001-06-01 00:00:00'}   {ts '2010-04-01 00:00:00'}   {ts '2011-04-06 00:00:00'}    {ts '2011-04-06 00:00:00'}    {ts '2004-11-01 00:00:00'}    {ts '2010-05-04 00:00:00'}, etc
    I've been googling it all day and nothing I see if working.
    Thank!

    Thanks for pointing that out. I was playing DATE_FORMAT to convert to a string
    DATE_FORMAT(p.intakeDate, '%Y-%m-%d') as intakeDate

  • Selecting data from single table with different condition in single query

    Hi everybody...
    I have one table with col1, col2, col3, col4, col5... as columns.
    I want to select col1, col2, col3 with condition (x=y and a=b and c=d)
    I want to select col4, col5 with condition (x=y and a=b and m=n )
    in single query...
    Thanx for ur help

    Given this data set...
    SQL> select * from oddity
      2  /
          COL1       COL2       COL3       COL4       COL5 A X C M
             1          2          3          4          5 B Y   M
             1          2          3          4          5 A Y C N
             1          2          3          4          5 A Y D M
             1          2          3          4          5 A Y D N
             1          2          3          4          5 B Y D N
             1          2          3          4          5 B Y D U
    6 rows selected.
    SQL>The following query meets the requirements. Of course, the requirements as stated are incomplete. I ahave assumed that we select all five columns if C=D andM=N.
    SQL> SELECT decode(c, 'D', col1, '0') AS col1
      2         , decode(c, 'D', col2, '0') AS col2
      3         , decode(c, 'D', col3, '0') AS col3
      4          , decode(m, 'N', col4, '-8') AS col4
      5           , decode(m, 'N', col5, '-8') AS col5
      6  FROM oddity
      7  WHERE a = 'B'
      8  AND  x = 'Y'
      9  /
          COL1       COL2       COL3       COL4       COL5
             0          0          0         -8         -8
             1          2          3          4          5
             1          2          3         -8         -8
    SQL> Cheers, APC

  • Inserting data in remote database with remote procedure

    Hi,
    I have a problem concerning inserting data in a remote database (10g) by using a remote procedure.
    I call the procedure from a 11g database just by doing:
    begin
    getlocalfilecontent@remoteserv(param)
    commit;
    end;
    And it wouldn't insert the data into the remote table.
    While when I execute the same procedure locally on that remote database (10g)
    It does insert the data I want.
    What could be causing the problem here, am I overseeing something?
    Edited by: user7634309 on 14-Aug-2009 02:14

    Already thanks for the fast replies
    The dblink works perfectly. I can select data etc with this dblink.
    The procedure on the remote database is the same.
    One other thing, when I execute the remote procedure on local database 2nd time I get the
    ORA-ERR: ORA-02041: client database did not begin a transaction.
    This could be fixed by doing a commit or rollback but still no inserting in remote table.
    So to sum it up:
    What doesn't work:(no inserting)
    On 11g server that calls remotely the procedure
    begin
    getlocalfilecontent@remoteserv(parameter);
    commit;
    end;
    What works(does insert)
    On 10g server calling the procedure locally
    begin
    getlocalfilecontent(param);
    commit;
    end;
    So everything is the same except on the 11g server I add the dblink spec behiind the procedurecall

Maybe you are looking for

  • Blank header appears when validating  leave request from the UWL

    Hello, We are using SAP Portal 7.3 and BP_ERP5MSS 1.51 SP06 according note oss 1618269 with a backend ECC6 EHP5 SPS06. We are facing the following issue :: "Leave Request Approval screen is poping with blank header". This  issue occurs when launching

  • Running logminor from OEM java based console

    Hi, I don't see a few applications when i launch java based OEM from my Administration Client (Oracle 10g). For example i don't see logminor viewer in it but from the web, i have searched that i can use "oemapp.bat lmviewer" command to do this. How c

  • Resizing and conversion of Multi Ad Creator files to InDesign files

    Hi all I am really out of my depth here! Hope someone can help me... I am part of a project at my company to investigate the quickest and easiest way to open Multi Ad files and resize them, including resizing the content to fit. The size change is on

  • Voip inbound call

    Hi, i just received my UC540 and try to configure the sip trunking. SIP outgoing calls are ok, but not incoming ... when i active the debugging, the logs shows me : 003312: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:    Calling Number=3397999447, Called

  • Placing image icon on top of batch file

    i am creating a batch file , now i want to place application specific icon on top of that file , so how can i do it through my code File batchFile = new File(installationDirectory+ "\\"+ "QTL.bat"); fos = new FileOutputStream(batchFile); DataOutputSt