SELECT MAX(field) / SELECT MIN(field) return wrong values

Hi,
I have the query:
Select 
    MAX(b1.time_s) as time_s 
From
    BUSINESS_INVOCATIONS b1 
Where
    b1.time_s >= 1219217034000 
    AND  b1.rec_sess_id = 2197756621378027521 
    AND  b1.comp_id IN  ( Select id  From J2EE_CONFIGURATION_BEAN  Where j2eeApplicationsTableId = 378302371920347137 )
This return the MAX value of the comp_id and not the MAX value of the b1.time_s
looks like there is a BUG in MAXDB when i have a join of two tables the MAX/MIN functions works on the wrong fields!
If i change the query to be:
Select 
    max(b1.time_s) as time_s 
From
    BUSINESS_INVOCATIONS b1,
    J2EE_CONFIGURATION_BEAN jcb
Where
    b1.time_s >= 1219217034000 
    AND  b1.rec_sess_id = 2197756621378027521
    AND jcb.j2eeApplicationsTableId = 378302371920347137
    AND  b1.comp_id = jcb.id
The MIN/MAX functions works good and return the right value
Pleasehelp me to find what is the problem and if any one already have a solution.
Thanks,
Yosef

Dta for BUSINESS_INVOCATIONS tabel:
ID,CLASS_TYPE,M_TIME,FUNCTIONENTRYID,TOP_PARENT,START_TIME,TIME_S,COMP_ID,REC_SESS_ID,PARENT,HTTP_SESSION,INVOCATION_HASH_CODE,MINOR_INVOCATION,TRANSACTION_ID,USER_TRACING_COOKIE,TRACINGTYPE
2089670230321135617,H,1219738865499,1387108688451338241,2089670230321135617,1219217053734,1219217053734,414331168939311111,2197756621378027521,(null),2179742222868545537,-1238173181,GET,null,null,-1
2089670230321135618,H,1219738865499,1387108688451338242,2089670230321135618,1219217071156,1219217071156,414331168939311108,2197756621378027521,(null),2179742222868545538,-628203986,GET,null,null,-1
2089670230321135619,H,1219738865499,1387108688451338279,2089670230321135619,1219217073531,1219217073531,414331168939311112,2197756621378027521,(null),2179742222868545538,545948335,GET,null,null,-1
2089670230321135620,H,1219738865499,1387108688451338284,2089670230321135620,1219217075671,1219217075671,414331168939311119,2197756621378027521,(null),2179742222868545538,1958406838,GET,null,null,-1
2089670230321135621,H,1219738865499,1387108688451338289,2089670230321135621,1219217077359,1219217077359,414331168939311106,2197756621378027521,(null),2179742222868545538,-2089005650,GET,null,null,-1
2089670230321135622,H,1219738865499,1387108688451338292,2089670230321135622,1219218442312,1219218442312,414331168939311115,2197756621378027521,(null),2179742222868545538,-1298180580,GET,null,null,-1
2089670230321135623,H,1219738865499,1387108688451338297,2089670230321135623,1219218467765,1219218467765,414331168939311107,2197756621378027521,(null),2179742222868545538,1318337921,GET,null,null,-1
2107684628830617601,E,1219738865515,1387108688451338244,2089670230321135618,1219217071171,1219217071171,324259176391901185,2197756621378027521,2089670230321135618,2179742222868545538,586868856,(null),(null),(null),-1
2107684628830617602,E,1219738865515,1387108688451338281,2089670230321135619,1219217073531,1219217073531,324259176391901185,2197756621378027521,2089670230321135619,2179742222868545538,1886325459,(null),(null),(null),-1
2107684628830617603,E,1219738865515,1387108688451338286,2089670230321135620,1219217075671,1219217075671,324259176391901185,2197756621378027521,2089670230321135620,2179742222868545538,-550916224,(null),(null),(null),-1
2107684628830617604,E,1219738865515,1387108688451338291,2089670230321135621,1219217077359,1219217077359,324259176391901185,2197756621378027521,2089670230321135621,2179742222868545538,1676270392,(null),(null),(null),-1
2107684628830617605,E,1219738865515,1387108688451338294,2089670230321135622,1219218442312,1219218442312,324259176391901185,2197756621378027521,2089670230321135622,2179742222868545538,-2074647744,(null),(null),(null),-1
2107684628830617606,E,1219738865515,1387108688451338299,2089670230321135623,1219218467765,1219218467765,324259176391901185,2197756621378027521,2089670230321135623,2179742222868545538,63795915,(null),(null),(null),-1
3278620531946946561,T,1219738865483,1387108688451338291,2089670230321135621,1219217077359,1219217077359,2828260569209896968,2197756621378027521,2107684628830617604,2179742222868545538,-1511714853,java.lang.ArithmeticException,(null),(null),18
Daa for J2EE_CONFIGURATION_BEAN Table:
select * from IDENTIFY.J2EE_CONFIGURATION_BEAN
ID,J2EEAPPLICATIONSTABLEID,J2EEAPPLICATIONID,J2EECOMPONENTID
180144094616485889,0,0,0
180144094616485890,0,0,0
180144094616485891,0,0,0
180144094616485892,0,0,0
180144094616485893,378302478220787713,0,0
180144094616485894,0,0,0
306244884182859777,378302478220787713,360288079711305731,306244884182859777
324259282692341761,378302478220787713,360288079711305731,306244884182859777
360288079711305729,378302478220787713,360288079711305729,0
360288079711305730,378302478220787713,360288079711305730,0
360288079711305731,378302478220787713,360288079711305731,0
360288079711305732,378302478220787713,360288079711305732,0
360288079711305733,378302478220787713,360288079711305733,0
360288079711305734,378302478220787713,360288079711305734,0
414331275239751681,378302478220787713,360288079711305731,594475260334571522
414331275239751682,378302478220787713,360288079711305731,594475260334571522
414331275239751683,378302478220787713,360288079711305731,594475260334571522
414331275239751684,378302478220787713,360288079711305731,594475260334571522
414331275239751685,378302478220787713,360288079711305731,594475260334571522
414331275239751686,378302478220787713,360288079711305731,594475260334571522
414331275239751687,378302478220787713,360288079711305731,594475260334571522
414331275239751688,378302478220787713,360288079711305731,594475260334571522
414331275239751689,378302478220787713,360288079711305731,594475260334571522
414331275239751690,378302478220787713,360288079711305731,594475260334571522
414331275239751691,378302478220787713,360288079711305731,594475260334571522
414331275239751692,378302478220787713,360288079711305731,594475260334571522
414331275239751693,378302478220787713,360288079711305731,594475260334571522
414331275239751694,378302478220787713,360288079711305731,594475260334571522
414331275239751695,378302478220787713,360288079711305731,594475260334571522
540432064806125569,378302478220787713,360288079711305732,594475260334571523
540432064806125570,378302478220787713,360288079711305732,594475260334571523
540432064806125571,378302478220787713,360288079711305732,594475260334571523
540432064806125572,378302478220787713,360288079711305732,594475260334571523
540432064806125573,378302478220787713,360288079711305732,594475260334571523
540432064806125574,378302478220787713,360288079711305732,594475260334571523
540432064806125575,378302478220787713,360288079711305734,594475260334571524
540432064806125576,378302478220787713,360288079711305734,594475260334571524
576460861825089537,378302478220787713,360288079711305730,576460861825089537
576460861825089538,378302478220787713,360288079711305731,576460861825089538
576460861825089539,378302478220787713,360288079711305732,576460861825089539
576460861825089540,378302478220787713,360288079711305733,576460861825089540
576460861825089541,378302478220787713,360288079711305734,576460861825089541
594475260334571521,378302478220787713,360288079711305729,594475260334571521
594475260334571522,378302478220787713,360288079711305731,594475260334571522
594475260334571523,378302478220787713,360288079711305732,594475260334571523
594475260334571524,378302478220787713,360288079711305734,594475260334571524
2810246277000855553,378302478220787713,360288079711305729,2810246277000855553
2810246277000855554,378302478220787713,360288079711305729,2810246277000855554
2810246277000855555,378302478220787713,360288079711305729,2810246277000855555
2810246277000855556,378302478220787713,360288079711305729,2810246277000855556
2810246277000855557,378302478220787713,360288079711305729,2810246277000855557
2810246277000855558,378302478220787713,360288079711305729,2810246277000855558
2810246277000855559,378302478220787713,360288079711305729,2810246277000855559
2828260675510337537,378302478220787713,360288079711305729,2846275074019819521
2828260675510337538,378302478220787713,360288079711305729,2846275074019819521
2828260675510337539,378302478220787713,360288079711305729,2846275074019819521
2828260675510337540,378302478220787713,360288079711305729,2846275074019819521
2828260675510337541,378302478220787713,360288079711305729,2846275074019819521
2828260675510337542,378302478220787713,360288079711305729,2846275074019819521
2828260675510337543,378302478220787713,360288079711305729,2846275074019819521
2828260675510337544,378302478220787713,360288079711305729,2846275074019819521
2828260675510337545,378302478220787713,360288079711305729,2846275074019819521
2828260675510337546,378302478220787713,360288079711305729,2846275074019819521
2828260675510337547,378302478220787713,360288079711305729,2846275074019819521
2828260675510337548,378302478220787713,360288079711305729,2846275074019819521
2828260675510337549,378302478220787713,360288079711305729,2846275074019819521
2828260675510337550,378302478220787713,360288079711305729,2846275074019819521
2828260675510337551,378302478220787713,360288079711305729,2846275074019819521
2828260675510337552,378302478220787713,360288079711305729,2846275074019819521
2846275074019819521,378302478220787713,360288079711305729,2846275074019819521
3152519848681013249,378302478220787713,360288079711305729,3152519848681013249
3152519848681013250,378302478220787713,360288079711305730,3152519848681013250
3152519848681013251,378302478220787713,360288079711305731,3152519848681013251
3152519848681013252,378302478220787713,360288079711305732,3152519848681013252
3152519848681013253,378302478220787713,360288079711305733,3152519848681013253
3152519848681013254,378302478220787713,360288079711305734,3152519848681013254
3170534138742571009,0,0,0
3170534138742571010,0,0,0
3170534247190495233,0,0,0
3170534247190495234,0,0,0
3602879811418062849,378302478220787713,360288079711305729,594475260334571521
Hope this will help:)
Thanks,
Yosef

Similar Messages

  • Statvfs returns wrong values

    Hi,
    I am developing a program the will check for disk space (used,blocks, available ...) and i am using the statvfs.h file.
    When tested with small capacity disks (~5G) it works fine (compared to df -k).
    When tested with large capacity disks (~400G) it returns wrong values(compared to df -k).
    I am using f_bavail and i am casting from fsblkcnt_t to integer/long.
    Please help.
    Thanx R.

    Thanks for your answer.
    I have discovered that it (statvfs.h) doe's not work with vxfs, only with ufs.
    I am using Veritas Cluster Server.
    Any chance of an answer ??
    thanks,
    R.

  • On Firefox stage.stageWidth stage.stageHeight return wrong values

    Hello,
    I have a problem on firefox windows 8, stage.stageWidth and stage.stageHeight return wrong values,
    swfobject.embedSWF("mySwf.swf", "mySwf", "500", "500", "14.0.0","expressInstall.swf", flashvars, params, attributes);
    on ie, Chrome stage.stageWidth and stage.stageHeight return 500
    on iFirefox stage.stageWidth and stage.stageHeight return 750 and my animation is smaller (66%)
    Thanks

    In order to target iPhone 5 you need to use AIR 3.5 beta or AIR 3.4
    pointing to iOS 6 SDK. Be sure to include the [email protected] to
    trigger the iPhone 5 size. In other words, the app has to be built
    targeting the iOS 6 SDK and have the new default png to trigger the full
    size on the iPhone 5.
    AIR 3.5 beta includes the bits that to target iOS 6 SDK, but you can
    target iOS 6 with AIR 3.4 by using the external SDK path in the package
    ANE prompt in FB 4.6
    http://labs.adobe.com
    iBrent

  • When orientation change and soft keyboard is activated, return wrong value

    Hello,
    in a View, when the orientation change and the soft keyboard is activated, this.navigator.height return wrong value.
    systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
    public function orientationChangeHandler(event:StageOrientationEvent):void {
    inp.text=String(this.navigator.height);
    thanks.

    Can you attach a simple sample application that demonstrates this?  What device are you seeing this issue on?

  • Multiple Select List not returning multiple values

    I have created a Multiple Select List, and the manual says that when multiple values are selected and the page is submmitted (I'm using a GO button), the multiple values are put into the ITEM field, separated with a colon . However, whenever I select multiple entries in my list, it only ever returns a value for the first item (like a single select list).
    Does anybody know what I may have missed ? I'm still fairly new to this stuff, so I'm hoping it's fairly simple!
    thanks.
    p.s I'm using a dynamic list of values.

    Andy / Scott,
    Sorry, please bear with me ... still new to this.
    I have a multi select list item in page 2, called P2_MULTI_LIST. When the page is submitted, I no longer physically pass it to page 3, but how would page 3 pick up the value ? Do I need to set up a P3_MULTI_LIST item in page3 and set that item to the P2_MULTI_LIST value, or do I reference P2_MULTI_LIST directly in my Page3 SQL query ?
    Also, if I then want to propogate the value in P2_MULTI_LIST down to another page from page3, via a link in a report, is this possible ?
    thanks
    Tim

  • Editable field gives wrong value in report.

    Hi,
    I have report with some editable fields. I am using apex_item for one editable select list. I gave functionality to update row by providing go button. when user clicks on go button, I sends page by using javascript dosubmit which updates values in table through update process. everything works fine but sometimes i am not able to read particular value in row. for example...
    Rownum---------select_list--------- button---------- comment(editable)-not used apex_item
    1------------------------ 'abc'---------------- GO----------------------------- new
    2------------------------- null---------------- GO--------------------------- closed
    3 ------------------------'xyz'---------------- GO--------------------------- reopen
    I used apex_item for select list but status is made editable by selecting "text area" from tabular form element of column.
    when I press GO button on row third by selecting xyz it takes null value of 2nd row. same if I select something in 2nd row. i.e. instead of null if I selects 'mno' in 2nd row it takes select list value as 'mno' for third row. I observed this by writing javascript code which alerts me value of variable f01,f02.....
    Please if anybody can help me. I want to know why this happens?

    You might have better luck asking in the Oracle Application Express (APEX).

  • How To? Select List item return 2 values (high and a low)

    Can anyone suggest how to make a select list drop box return 2 values for my query.
    eg:
    Pick from
    Last Week
    Last Month
    Last Year
    return high/lo values of
    5-feb-06 12-feb-06
    01-jan-06 31-jan-06
    01-jan-05 31-dec-06
    Such that my query can refer to it as
    select *
    from tabx
    where dte > :parm_lo
    and dte < :parm_hi
    You get the idea ..

    I haven't tested this at all, so it may not work, but the first thing that springs to mind is not returning the two dates, base it on the current date, i.e. have your select list return something like -
    Last Week - Return 'W'
    Last Month - Return 'M'
    Last Year - Return 'Y'
    then use a query something like -
    SELECT *
      FROM tabx
    WHERE dte >
              CASE v ('ITEM')
                 WHEN 'W'
                    THEN TRUNC (SYSDATE, 'd')
                 WHEN 'M'
                    THEN TRUNC (SYSDATE, 'Mon')
                 WHEN 'Y'
                    THEN TRUNC (SYSDATE, 'yyyy')
                 ELSE dte - 1
              ENDLike I said, completely untested and may not work...you may also have to play around with the boundary values (NLS settings too perhaps).

  • Trying to dynamically output form fields returns URL values

    Hello,
    If there is a better way to go about this (which is quite likely), please let me know how to go about it.
    I'm working on some code that is supposed to dynamically set the form variables as regular variables so that we can be lazy and not have to refer to the variable with form.somevariable name.
    That part works perfectly.  Until I start testing for URL conflicts in which a URL variable has the same name.  For instance. . .
    I have a form that passes two variables; FirstName and LastName.  If I hit the page, the form shows up, I input a first and last name and click submit.  The code works perfectly.
    However, if I have URL variables with the same names, the code reports the url variable values instead of the form values.
    Some sample values;
    url.FirstName = Joe
    url.LastName = Black
    form.FirstName = Steve
    form.LastName = White
    My code that exposes the form variable will correctly find the form field names, but then when I 'evaluate' the value of the given form field, it will return the value of the URL variable of the same name rather than the form variable.
    What I am really wanting (as I described briefly up above) is to have code that automatically converts client, URL and Form variables into 'regular variables' so that you don't have to write lots of extra code grabbing them later on.  Frameworks like CFWHEELS and ColdBox do this by default, but at the company I work out, we aren't using any of them.  I need it to expose the URL variables, but give presidence to form variables if they have the same name, because they are likely to be intended to do an update or such.
    The code follows  Feel free to ignore the code for the URL and client variables if you wish as they don't directly affect how the form code works, I have tested with them commented out and I get the same result.  I provided all of it to give a more complete idea of what I have been toying with so far.  Please note that I don't normally use 'evaluate'.  There is probably a better way to go, but I don't know what it is.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <!--- Create a form so that we can post some form variables --->
    <form action="" method="post">
        First Name <input type="text" name="FirstName" />
        Last Name <input type="text" name="lastName" />
        <input type="submit" />
    </form>
    <!--- Set a variable to hold the list of URL variable names --->
    <cfset paramsurl = structKeyList(url)>
    <cfoutput>
    <br />
    URL variables:
    <!--- Loop through the list of url variables and then dynamically set a new variable to be equal to whatever is held by it --->
        <cfloop index="i" list="#paramsurl#">
            <cfset myDynVar = Evaluate(i)>
            <!--- Let's output the dynamically created variable as a test --->
            #i# = #myDynVar#<br />
        </cfloop>
    </cfoutput>
    <!--- If form fields exist --->
    <cfif isdefined("Form.FieldNames")>
        <cfoutput>
            <b>Field Names:</b> #Form.FieldNames#
            <p>
                <b>Field Values:</b><br>
                <cfloop INDEX="TheField" list="#Form.FieldNames#">
                    #TheField# = #Evaluate(TheField)#<br>
                    <cfset TheField = Evaluate(TheField)>
                </cfloop>
            </p>
            Lets try and output the two form fields without using the "form." notation<br>
            FirstName : #FirstName# <br />
            LastName : #LastName#
        </cfoutput>
    </cfif>
    <br />
    The client variables currently available are:<br />
    <cfoutput>
        <cfset nVarCounter = 1>
        <cfloop list="#GetClientVariablesList()#" index="whichClientVar">
            #whichClientVar# : #client[whichClientVar]#<br />
            <cfset whichClientVar = Evaluate(whichClientVar)>
        </cfloop>
    </cfoutput>

    Try this:
    <cfset structAppend( FORM, {
              'alpha' = 'bravo',
              'charlie' = 'delta',
              'echo' = 'foxtrot'
    }, true ) />
    <cfset structAppend( URL, {
              'alpha' = 'zulu',
              'lima' = 'mike',
              'echo' = 'papa'
    }, true ) />
    <!--- List the scopes in ascending order of importance. --->
    <cfdump var="#FORM#" label="FORM scope" />
    <cfdump var="#URL#" label="URL scope" />
    <cfset scopes = "url,form">
    <cfloop list="#scopes#" index="i">
              <cfloop list="#structKeyList( evaluate( i ) )#" index="j">
                        <cfset structInsert( VARIABLES, j, evaluate( i & '["' & j & '"]' ), true ) />
              </cfloop>
    </cfloop>
    <cfdump var="#VARIABLES#" abort="1" label="Combined Variables Scope" />
    What I did is insert 3 key/value pairs into the FORM and URL scope.  I then dumped the scopes to show their structure and values.  Then I defined a variable (scopes) which is a list of the least important scope to the most important.  After that, the loop I do simply goes through the SCOPES, their exisiting key/values and sets them into the VARIABLES scope.  Then, when it moves to the next scope of importance, it simply puts their value into the variables scope as well (overriding in the event it already exists), thus, the scopes defined later in the list override and replace.
    Then I just dump the VARIABLES scope (you'll notice it has the I, J and SCOPES variables in there that I used to create the loop.  If you perform this action in a function, simple make the I, J and SCOPES variables part of the LOCAL scope so they won't be in your VARIABLES scope.

  • I want a select statement to return two values, sum of one column and customer number

    I have two columns one called invoice_number and the other invoice_amount. I want a select statement to return two columns.... invoice_number and then the sum of the invoice_amount(s) for each unique invoice number.
    SELECT sum(invoice_amount) AS Totalinvoice_amount FROM InvoiceTB where invoice_number = 'INV102'
    This is where I've started, which returns:
    Totalinvoice_amount
    500.00
    Any help is appreciated.
    Please mark my post as helpful or the answer or better yet.... both! :) Thanks!

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • @@ServerName returns wrong value in SQL SERVER 2008

    One of my production server configured as Mirror server. When i run @@ServerName query on Principal server i got right server name. but when i execute same query on mirror server it returns Principal server name. I have windows server 2008. I don't know
    why it happens.
    Shamas Saeed (if Post helpful please mark as Answer) http://shamas-saeed.blogspot.com

     
    Unfortunately this won't help, since sp_dropserver '[name]' is used for dropping  the name of
    @@servername, not for the name of
    SERVERPROPERTY('ServerName').   
    SERVERPROPERTY('ServerName')  is wrong while @@servername
    is right.
    In this sql server, there are two sql services:  one is the default server name, and another is the wrong instance name
    SQLBEYONDPAY\SQLC.
    Currently, when I connect to SQLCBP instance, when I select SERVERPROPERTY('ServerName'), it returns
    SERVERPROPERTY('ServerName') =SQLBEYONDPAY\SQLC (bad name), it needs to be 'SQLCBP' instead. When I select
    @@servername, it returns SQLCBP (good) already.

  • NI PCI-6602: semi-period measurement stops unexpectedly or returns wrong values

    Hi,
    Using an NI PCI-6602 card we try to measure the semi-periods of a digital signal.
    In "continuous sampling mode", 10 samples are collected in the buffer and then are read
    out.
    Up to 6 counters on this card are sampling the same signal in our testing configuration.
    Here we found these issues:
    1. Failure
    In principle, the measurement runs correctly, but one or more counters sporadically may
    suffer a complete failure. I.e. these counters don't provide samples anymore.
    Only after stopping and restarting the assigned task, a failed counter works again.
    Apparently, a counter failure is most likely to happen when
        - the sampled signal "changes", i.e. when the pulse width of the signal changes,
        - or when the computer load is high, e.g. when opening a window of another application.
    Every counter occasionally failed, but the issue was found very often at counter 1 of
    the PCI-6602 card, if we used counters 0 through 5 in parallel.
    Using another PCI-6602 card, the failures happened preferably on counters labeled "near"
    number 5.
    2. Wrong values
    Occasionally the "interpretation" of the sampled values changes, i.e. the length of the
    "high level" period is returned, where the "low level" period length should be given, and
    vice versa.
    This is our task configuration:
    Configuration done with MAX:
    Signal input range:    2 usec - 2 sec
    Custom Scaling:        None
    Sample mode:        continuous
    Buffer size:        10 Samples
    In addition these calls are made:
    ret = DAQmxSetDigEdgeArmStartTrigSrc( task->mHandle, <use the same terminal as is used for
    the signal to be measured>);
    ret = DAQmxSetArmStartTrigType( task->mHandle, DAQmx_Val_DigEdge);
    ret = DAQmxSetDigEdgeArmStartTrigEdge( task->mHandle, DAQmx_Val_Rising);
    ret = DAQmxSetCISemiPeriodStartingEdge( task->mHandle, <the channel>, DAQmx_Val_Falling);
    Best regards
    Manfred

    Hi Manfred7,
    did you already test this behaviour with a simple example from us?
    Just go through the example database and try the examples there.
    These examples should work. 
    If it works, there is a problem with your programm.
    If it won't work, please tell me more about your software:
    - Version
    - DAQmx Version ,...
    best regards
    Dippi 

  • Datasocket return wrong value

    Hello Everyone:
    I am using datasocket to communicate with an opc server.I built a quite simple vi to test the communicaion as you see in the picture.If I highlight the execution I got the right return value( a boolean type indicator),but I run it normally I get the wrong value.The quality of the datasocket read vi display 0.Meanwhile if I add a while loop outside the datasocket read vi,then I get the right value again.I only want to read the opc tag once,do not want to add the while loop in this vi.What should I do?please help me.Thank you very much!

    你先尝试在DataSocket read vi的输入节点加入延时(根据实际应用调节下延时长短)。
    Li Yi

  • Registry calls return wrong values - how to fix?

    Here is the code used to open the key (all the variations shown produce the same behaviour)
    bool Win32_OpenKey( const HKEY uPlaceInRegistry, HKEY& xKey, const char* const szKeyName, const bool bReadOnly = false )
    // SE: make sure key exists
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // so i have replaced it with the following line
    //const bool bOpened = RegOpenKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    const bool bOpened = RegOpenKeyEx( uPlaceInRegistry, szKeyName, 0,
    bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS, &xKey ) == ERROR_SUCCESS;
    bool bCreated = false;
    if( !bOpened )
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // the Licensor will create keys except in the case where we upgrade a user from
    // an old license... so now using the Ex version in hopes it magically works.
    //bCreated = RegCreateKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    DWORD uDisposition = -1;
    bCreated = ( RegCreateKeyEx( uPlaceInRegistry, szKeyName, 0, 0,
    REG_OPTION_NON_VOLATILE, bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS,
    0, &xKey, &uDisposition )
    == ERROR_SUCCESS );
    return bOpened || bCreated;
    Here is where the values are queried.
    unsigned int uMagic = 0;
    unsigned long uType = 0xFFFFFFFF;
    unsigned long uSize = sizeof( unsigned int );
    //long err = RegGetValue( xKey, 0, "Magic", RRF_RT_DWORD, &uType, &uActivated, &uSize );
    uType = REG_DWORD;
    long err = RegQueryValueEx( xKey, "Magic", 0, &uType, reinterpret_cast< LPBYTE >( &uMagic ), &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_DWORD ) && ( uSize == sizeof( unsigned int ) ) )
    unsigned long long ullReadStartDate = 0;
    uSize = sizeof( unsigned long long );
    err = RegGetValue( xKey, 0, "Number", RRF_RT_QWORD, &uType, &ullReadStartDate, &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_QWORD ) && ( uSize == sizeof( unsigned long long ) ) )
    The values that are returned do not match the registry.
    In fact the values returned are values that we never would have written either. The zero is fishy because maybe it indicates bad behaviour. The messed up time_t value is even more confusing... it comes from a more than 30 days ago, which is around the time
    when I first started working on this code.
    To make a guess I am getting back an ancient version of the key values which is somehow preserved and accessible but can not be seen in regedit. I have no idea why this is suddenly happening either - this code (before my commented changes were made) worked
    exactly as expected for a few weeks now.
    Slightly unrelated but it also seems that a standard user can not write to HKCU in our repeatable tests. This seems slightly crazy as well... should I just not be using the registry? It never seemed like a good idea, but I have done it to try and fit the
    platform way of doing things after hitting lots of problems with naive use of files...

    thanks for the tips. will probably come in handy in the future. :)
    it turned out to be permissions and bad documentation in my case. the virtual store thing was not writing to where the docs say it should, and so something was lingering somewhere i couldn't find in the right place under any of the top level registry keys.
    maybe there is some other place where it has gone in the registry that i am just not finding the documentation for...
    my ultimate fix was to use a file in ProgramData :)
    I figured I'd try and do it 'the MS way' and use the registry. what a terrible idea that turned out to be, since I guess its no longer the MS way given how riddled with backwards compatibility hacks it seems to be...

  • Oracle 11g stored procs: SELECT ALL_ARGUMENTS not returning certain values in certain cases

    I'm doing a select on the ALL_ARGUMENTS like:
    SELECT count(*) FROM all_arguments WHERE owner LIKE 'MySchema' ESCAPE '/' AND object_name LIKE 'MyStoredProc' ESCAPE '/' AND package_name LIKE 'MyPackage' ESCAPE '/';
    Sometimes, after connecting to the DB after a certain period of time, I get a result = 0, althought the Stored Procedure is there. Immediatelly after that I retry, and I get result = 2.
    Why is that? Does the SELECT recompile the stored proc?

    I'm surprised that you get anything if you use that query.
    Oracle considers object names to be uppercase unless the name is enclosed in double quotes. So there would be no schemas with a name 'MySchema' since the name would actually be 'MYSCHEMA'.

  • Few Projectproperty and Listproperty fields returning empty values (CrossListQueryInfo)

    I am running a CrossListQueryInfo and the ViewFields for the CAML includes
    <ProjectProperty Name="Title"/>
    <ProjectProperty Name="Url"/>
    <ListProperty Name="Title"/>
    <ListProperty Name="DefaultViewUrl"/>
    I am getting empty values for Url and DefaultViewUrl, although it is returning Titles correctly. Is this some limitation or I am missing something?

    I Feel I have to say this... Just a thought: have you received legal
    advice on whether the "data sent by email is not secure" disclaimer
    would hold up? I'd recommand also checking with your merchant account
    provider. Your form could be argued as leading the user into
    irresponsible use of their card.
    Aandi Inston

Maybe you are looking for

  • How do you create a graph in numbers with different x-values?

    For my chemistry class I have to create one scatter plot with three different sets of "x" and "y" values. I have done it before but it is not working. What is an easy way to accomplish this?

  • Framecounter: Omitting slides from the count

    Using Captivate 3. I downloaded the framecounters from our friend at the raisingaimee website and I'm stuck on one aspect over the past several months that occasionally creates confusion for my students. For example, let's say I have a 30 slide prese

  • January Apps not syncing - answer

    It's been posted a few times but, I'm just throwing it out here so people will see it (again). If you've recently bought the january apps(and home screen mod) and are wondering why they haven't been syncing to your touch, is because you do not have a

  • Adding node back into cluster after removal...

    Hi, I removed a cluster node using "scconf -r -h <node>" (carried out all the other usual removal steps before getting this command to work). Because this is a pair+1 cluster and the node i was trying to remove was physically attached to the quroum d

  • Does an iPod 1 have to be connected to a Mac to download stuff

    Does an iPod 1 have to be connected to a Mac to download stuff