Question about strange cursor behavior - Sybase ASE 12.5.4

Hi folks,
I have a stored procedure in Sybase ASE 12.5.4 presenting a strange behavior. Follow below some code to simulate the error.
/* Create the table structure */
drop table tbx1
go
create table tbx1
(c1 int,
c2 int,
c3 char)
go
/* Create a CLUSTERED index NOT UNIQUE */
create clustered index idx1 on tbx1 (c1)
go
/* Populate the table with few records */
insert into tbx1 select 1, 1, 'N'
insert into tbx1 select 2, 1, 'N'
insert into tbx1 select 2, 2, 'N'
go
/* Test case #1 - The following code will not fetch the 3rd record */
declare c1 cursor for
select c1, c2 from tbx1 where c3 = 'N'
go
declare @c1 int, @c2 int
open c1
fetch c1 into @c1, @c2
while @@sqlstatus = 0
begin
  select @c1, @c2  -- View the current fetched row
  update tbx1 set c3 = 'N' where c1 = @c1 and c2 = @c2
  fetch c1 into @c1, @c2 
end
close c1
deallocate cursor c1
/* Recreate the table structure */
drop table tbx1
go
create table tbx1
(c1 int,
c2 int,
c3 char)
go
create clustered index idx1 on tbx1 (c1)
go
/* Repopulate the table */
insert into tbx1 select 1, 1, 'N'
insert into tbx1 select 2, 1, 'N'
insert into tbx1 select 2, 2, 'N'
go
/* Test case #2 - The following code enters in an infinite loop, fetching the 3rd record indefinitely */
declare c1 cursor for
select c1, c2 from tbx1 where c3 = 'N'
go
declare @c1 int, @c2 int
open c1
fetch c1 into @c1, @c2
while @@sqlstatus = 0
begin
  select @c1, @c2 -- View the current fetched row
  update tbx1 set c3 = 'N' where c1 = @c1
  fetch c1 into @c1, @c2 
end
close c1
deallocate cursor c1
If we execute a select on tbx1 before execute Test case #1, the result is:
c1   c2    c3
1    1     N
2    1     N
2    2     N
If we execute the same select on tbx1 after execute Test case #1, the result is:
c1   c2    c3
1    1     N
2    2     N   --> row position changed
2    1     N   --> row position changed
Analyzing the execution plan, updates on both Test cases are being done in deferred mode.
Could someone answer my questions, please:
1 - After executing Test case #1, 2nd and 3rd record change this position in table. How could this happening since I'm not updating any fields in the clustered index? This have any relation with deferred update deleting and reinserting the rows on overflows pages?
2 - Suppose the updates are changing the rows position in the table, how could explain the inconsistent fetch order on cursor processing (on Test Case #1, only 2 records are fetched - on Test Case #2, the loop never ends)?
Regards,
Douglas

Thanks for your replies. I've already solved my problem, just creating a unique clustered index. But I haven't understood what happened yet in the 2 cases above.
As suggested by Mark, I've read Chapter 18 from Transact SQL Users Guide. In section
"Join cursor processing and data modifications", there is a citation about what happens with cursor position after a update:
"A searched or positioned update on an allpages-locked table can change the location of the row; for example, if it updates key columns of a clustered index. The cursor does not track the row; it remains positioned just before the next row at the original location. Positioned updates are not allowed until a subsequent fetch returns the next row. The updated row may be visible to the cursor a second time, if the row moves to a later position in the search order".
As stated above, the cursor position keeps the same independently if the rows change their order.
I don't know if my logic is very simplistic, but I imagine that what should happen in #Test Case 1 is (assuming the access method is a clustered index scan):
a) After the 2nd fetch, cursor position is on 2nd row:
c1   c2    c3
1    1     N  
2    1     N   <-- cursor position
2    2     N  
b) After the update, 2nd and 3rd rows switch their positions, but cursor should keep its position (before 3rd row):
c1   c2    c3
1    1     N  
2    2     N  
                <-- cursor position
2    1     N
c) On 3rd fetch, the 3rd row is read "again" and cursor reaches the end of table.
In relation #Test Case 2, I can't imagine how a cursor could enters a infinite loop since the cursor position shouldn't change and "apparently the row positions are the same" after the "incorrect" update.
Moreover, I still have doubts about how a field update that isn't in a clustered index can change row position in a allpages-locked table.
The main goal of my questions isn't solve the problems but get a better knowledge about some Sybase internals (and avoid similar problems in the future).
Please give me more detailed explanations about my questions and comment my analysis. Related readings about this issues are welcome.
Douglas

Similar Messages

  • Question about the CSS behavior when using layer 3 sticky and sticky table

    Hi everyone,
    I have a question about the CSS behavior when using layer 3 sticky and sticky table is full.
    If I configure layer 3 sticky and specify the inactivity timeout as below, how does the CSS
    handle subsequent needed sticky requests ?
    advanced-balance sticky-srcip
    sticky-inact-timeout 30
    CSS document says that
    Note:
    If you use the sticky-inact-timeout command to specify the inactivity timeout
    period on a sticky connection, when the sticky table becomes full and none of
    the entries have expired from the sticky table, the CSS rejects subsequent
    needed sticky requests.
    My question is what is the next reaction by doing the CSS if the CSS is in the
    following condition:
    when the sticky table becomes full and none of the entries have expired from
    the sticky table, the CSS rejects subsequent needed sticky requests
    Does CSS just rejects/drops subsequent needed sticky requests ?
    or
    Does CSS does not stick subsequence requests to particular service but CSS forward
    subsequence requests with round-robin basis ? which means if the sticky table is full,
    the CSS just works round-robin load balancing fashion for subsequence requests ?
    Your information would be appreciated.
    Best regards,

    Hello,
    There is a good document explaining this on Cisco web site
    http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_tech_note09186a0080094b4b.shtml
    It depends if the sticky-inact-timeout is used or not. If not, it's FIFO (the oldest entry in the sticky table is removed). If yes, the CSS will reject the next sticky request.
    Rgds,
    Gaetan
    Rgds
    Gaetan

  • Question about Page Builder behavior - how to get a "please wait message" ?

    Hi all together,
    I got a question about Portal Framework / Page Buider handling iView Integration.
    We are working with a lot of App Integrator iViews and often the pages includes with app integrator are loading longer than the rest of the portal. So there is the idea to put in a "please wait while loading message" for the enduser.
    I analysed the html code, the page builder is generating and foud out 3 diffrent approaches how the page buider is rendering the IFRAME with the integrated application configured with an app integrator iView.
    My question is how can I influence this behavior to put a "please wait while loading message"?
    Different types of iView integration in the client I have seen:
    a) direct loading of the content in the IFRAME (<iframe id="" ... scr="/mysource">)
    b) Filling the iframe with 'about:blank' and loading the content later by filling a form with JS
         ( <iframe id="" .... scr="about:blank">and after the iframe  <form id="" action="mysource" ...>
    c) Filling the iframe with a html file from the portal layout and loading the content later by filling a form with JS (similar to b)
         ( <iframe id=""" ....scr="/irj/portalapps/com.sap.test.mylayout/html/blank.html>
    I checked that variant b) is getting generated when loading a page with different components on the side (not only the app integrator iview) and variant c) is generated when just one app integrator iView is positioned (no portal page).
    Goal: To get the "please wait picture" I want to know how to get variant c) in cases of different elements on one page
    So I would be able to put this picture on the HTML-Page in the Portal layout (blank.html)
    Hope, someone with a deep portal / page builder know-how can help me out!
    Another way: Does anybody knows another way how to put a "please wait message" while app integrator application is not loaded yet?
    Thanks in Advance and kind regards,
    Jens
    Edited by: Jens Kohne on Nov 24, 2010 9:08 AM

    Hi Jens,
    there are several reasons why you don't get the loading animation:
    Web Dynpro ABAP: https://service.sap.com/sap/support/notes/1432358 -> missing configuration
    Wrong height size for iView: https://service.sap.com/sap/support/notes/1358494 -> alter configuration of the iFrame height (loading animation gets displayed, but is hidden)
    FPN, BSP, BEx: https://service.sap.com/sap/support/notes/1290995 -> AI isn't showing the animation because of performance considerations. I guess that is your case. Depending on your portal version this is a simple service configuration or involves some customization.
    br,
    Tobias

  • Question about using cursor

    My question is about performance:
    If I have a java program to call a stored procedure using a cursor, the code segment is like this:
    ResultSet rs = oracleCallableStatement.getObject(a_cursor);
    while (rs.hasNext()) {
    rs.getString(column_name);
    My question is -- how does this work behind scene? Would my java process talk to oracle to get the next record for EACH call inside the while loop? If yes, this seems to slow down my program and we should avoid using cursor.
    Thanks in advance for any reply.
    tom

    Victor,
    Is there something similar using PL/SQL, we use a gateway connection to AS400. I see that a PL/SQL cursor is fetching as many times as there are number of rows.
    Thanks for your help in advance.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Victor Yu ([email protected]):
    Hi, Tom,
    Actually, Oracle JDBC will cache some rows in client side to reduce the round trip. It's called prefetching. Once your next() calls have run through those rows, JDBC will go back to fetch the next N rows. The default number of rows to prefetch to the client is 10. If your cursor return a lot of rows, say 1000 or more, you can change the number of rows to prefetch. Use the setRowPrefetch() method at the Statement level or setDefaultRowPrefetch() at the Connection level.<HR></BLOCKQUOTE>
    null

  • Strange cursor behavior?

    Hi, I'm brand new to Flex, and while testing my first program I noticed that I couldn't grab the hslider because my cursor was changing to a text selection cursor. Even though there is no text in the upper left corner, and a panel with no text that contains the slider, when I hover over the top left corner of the application the cursor turns to a selection cursor.  I have no Idea why this is happening.  There are no hidden text boxes or anything like that.  Any help would be appreciated.  Here's the code.
    <?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"width="400" height="280" backgroundColor="0xFFFFFF"backgroundImage="@Embed('../bg.png')" creationComplete="setup()" horizontalGap="10"layout="absolute" themeColor="0x8D8D8D" xmlns:components="com.adobe.sync.components.*"> 
     <mx:Script><![CDATA[
     import com.adobe.sync.events.SyncSwfEvent; 
     import flash.display.MovieClip; import flash.events.*; import flash.events.TimerEvent; import flash.text.TextField; import flash.utils.Timer; 
     import mx.core.*; 
     private var ui : UIComponent = new UIComponent(); private var tf:TextField; private var time:Timer; private var secondsLeft:Number = 300; private var started:Boolean; private var min:Number; private var sec:Number; private var timerStarted:Boolean = false; 
     public function setup() : void{
    tf = new TextField();timeLabel.text = "";ui.addChild(tf);
    addChild(ui);
    time = new Timer(1000);time.addEventListener(TimerEvent.TIMER, tick);
     //ui.addEventListener('enterFrame', startTimer);syncConnector.addEventListener(SyncSwfEvent.ROLE_CHANGED, roleChanged);
     function roleChanged(event:SyncSwfEvent):void{
     if (syncConnector.role == "owner"){
    hostPanel.visible = true;showButton.visible = false;}
     else{
    hostPanel.visible = false;showButton.visible = false;}
     function tick(e:TimerEvent){
    secondsLeft = secondsLeft - 1;
    min = Math.floor(secondsLeft / 60);
    sec = secondsLeft % 60;
     trace(sec); trace (sec % 10); if (secondsLeft <= 0){
    countDownText.visible = false;countDownFinishedText.visible = true;timeLabel.text = "0:00";}
     else if (sec < 10){
    timeLabel.text = String(min + ":0" + sec);} else {timeLabel.text = String(min + ":" + sec);}
     function startTimer(){
    secondsLeft = timeSlider.value * 60;
    time.start();
    toggleControls();
    countDownFinishedText.visible = false;syncConnector.dispatchSyncMessage("updateTime", secondsLeft, false);}
     function syncMessageReceived(event:SyncSwfEvent):void{
     switch (event.data.msgNm){ case "updateTime": if (!timerStarted)startTimer();
    secondsLeft = event.data.msgVal;
     break;}
     function toggleControls(){
     if (hostPanel.visible == true){
    hostPanel.visible = false;showButton.visible = true;} else if(showButton.visible == true){
    showButton.visible = false;hostPanel.visible = true;}
    ]]>
     </mx:Script> 
     <components:SyncConnector id="syncConnector" syncMessageReceived="syncMessageReceived(event)" /> <mx:Button id="showButton" right="20" bottom="20" label="Show Controls" click="toggleControls()"/> <mx:VBox x="30" width="50%" textAlign="left" verticalCenter="10"> <mx:Text id="countDownText" x="28" width="168" fontSize="16"text="The meeting will resume in..." verticalCenter="-45"/> <mx:Label id="timeLabel" x="28" y="127" width="152" height="74" fontSize="48"/> <mx:Text id="countDownFinishedText" width="152" fontSize="16"text="The meeting will continue shortly" verticalCenter="58"/> </mx:VBox> <mx:Panel id="hostPanel" left="20" right="20" top="20" bottom="20" alpha="1.0" layout="absolute"title="Host Controls"> <mx:Button id="hideButton" right="10" bottom="10" label="Hide Controls"click="toggleControls()"/> <mx:Button left="10" bottom="10" label="Start" click="startTimer()"/> <mx:HSlider id="timeSlider" left="10" right="10" top="10" height="36"labels="[0,20,40,60,80,100,120]" liveDragging="true" maximum="120"snapInterval="5" tickInterval="10" value="10"/> </mx:Panel> 
     </mx:Application>

    You've got your countdown text in the upper left hand corner (X=28).  Change that to a label. 
    If I ever have a front end issue where nothing happens when I think it should it is more often than not due to a front end error being thrown.  However, you will only see this error if you are running the debugger version of Flash in your browser (remember it is browser specific - so one loaded on Chrome isn't the same as one loaded in Firefox, etc).  Google "flash debugger player" to find it. 
    I've noticed you've got an "mx" prefix on everything including your app.  MX was the precurser to the "S" (Spark) prefix.  There are a few remaining components that are still MX, but you should really be using Spark components for everything.  Faster, better, easier, etc. 
    Finally, you're really into absolule layouts, huh?  Some objects (like the panel) already have layouts assigned to make your life easier.  You'll want to get into building skins and components to build out the layouts like you prefer then you'll spend less time with all the x and y business.  Also try playing with the vert and horizontal layouts. 
    Good luck!

  • Question about ASE 15.7 kernel mode – process vs threaded

    Hi there,
    This question is related to upgrading Sybase ASE Server
    from version 15.5 to version 15.7 on Sun Solaris SPARC Operating System
    (Solaris 10). For the upgrade, I need to choose between threaded kernel and
    process kernel mode.
    1> Is the process kernel mode in ASE 15.7 identical to
    process kernel in ASE 15.5? Are there any changes to process kernel mode
    between version 15.5 and 15.7? With all the other configurations on the Solaris
    host being same (Number of CPUs, RAM, Storage, Sybase ASE Configuration
    parameter values like total memory, engines), will the performance on ASE 15.7
    in process kernel mode be same as on ASE 15.5?
    If there are differences in performance, what are they? What should I be monitoring on ASE 15.7 to see
    if there is performance issue on the ASE Server?
    2> For the threaded kernel mode, are there any performance
    overheads like more CPU usage? We are not planning to change the hardware
    configuration of the Solaris host during the upgrade.  What values should I be monitoring at the OS
    level OR Sybase ASE level to make sure that there are no performance issues? Is
    there any particular parameter that needs to be monitored closely when we
    change to threaded kernel mode?
    Are there any Sybase Configuration parameters that I need
    to tune for the New threaded kernel mode? If so, do you have any performance
    tuning tips (white papers, technical documents) for threaded kernel mode?
    3> What is SAP Sybase recommendation on which Kernel mode I
    should be using? I researched the SAP Knowledge Base articles for
    recommendations on which Kernel mode to use and I could not find a definitive answer.
    Thanks,
    Raj

    Actually with Solaris on SPARC, there is a very key consideration - you should be on ASE 15.7 sp50 or sp100 or higher AND have applied the kernel jumbo patch (Oracle BugID 16054425) from Solaris that fixes the issue in which they prohibited OS threads from issuing KAIO calls.   Then in ASE, you need to configure the 'solaris async i/o mode' parameter.
    The changes between threaded and process mode kernels should be transparent to your application.  Generally speaking, SAP recommends 'threaded' kernel mode - and specifically for SAP applications only certifies 'threaded' kernel mode.    For custom applications, you *could* use either - although, depending on how many engines you run and what chipset you are on, you might see better performance with one vs. the other - typically threaded kernel mode is better, although there are exceptions.
    Generally, the main difference is that in process kernel mode, each engine did disk and network IO polling.   Due to OS security restrictions, this often meant that a engine had to process the disk IO in which it submitted...or for networking, your SPID had to run on your network engine for any network IO.  In threaded mode, there is a single parent process with engine tasks (threads) and IO tasks (threads).   Consequently, for customers used to running in the 10's of engines, we suggest a starting point of reducing the number of engines by 2 to give the IO tasks CPU time.
    One reason why threaded mode is often better is due to OS scheduling.   With hardware threaded cores, most OS dispatch schedulers do a better job of spreading the threads across the cores before utilizing the threads when a process is multi-threaded with POSIX threads - then a multi-process/kernel threaded implementation.   At one customer, we proved that we consistently got the best performance with threaded kernel and the only way we could match it with process kernel was to use OS cpu affinity to bind the ASE engine processes to individual cores.
    However, one consideration is that older SPARC Niagara chips (T1-T4) were notoriously bad at network handling for some reason.   As a result, one of the recommendations for ASE on SPARC Niagara chips is to run the same number of network engines as the number of cores ASE is using.   One solution to that is in Solaris 11 (I think) where Solaris finally started being able to handle network interrupts better - I also think the T5/T6 are much better chips - but I have no customer experience data to go on there.

  • Question about 360 movieclip with cursor action

    Hello Flash Forum
    We have a question about a 360 flash / movieclip which comes
    to a halt or jumps to whereever the cursor is moved horizontally
    while any vertical movements is ignored. We are having difficulties
    to implement this and would like to ask whether someone can point
    us into the right direction in Flash 8 - read somewhere that this
    is extremely easy in Flash 8 but we cannot find out how!?
    An example would be:
    http://www.kswiss.com/cgi-bin/kswiss/store/product_detail.html?mv_arg=x&pid=01190:177
    and then chosing 'Go 360'
    Thank you for any assistance and/or direction.
    Alex

    Alex, took a look at your sample - looks to me like
    start_drag and stop_drag on mouse_over. Hope this helps. ash

  • Unexpected Windows cursor/Waveform Graph cursor behavior

    Hi,
    I got a very strange Windows cursor behavior with waveform graph. Simplified VI is attached.
    LabVIEW 2014 SP1
    The problem is:
    The VI contains only one waveform graph.
    1. I start the VI. Cursor Movement Tool is selected in the Graph Palette by default. Corresponding “Cross with dot” Windows cursor appears when mouse is moved over the plot area (see image). So far so good.
    2. I select Zoom in the Graph Palette and use it two-five times (second image).
    3. I select Cursor Movement Tool in the Graph Palette again but Windows cursor does not change as it should. It is an open cross now (third image); i.e. the same as shall appear when cross of Graph Cursor Lines is reached.
    4. I click mouse three-seven times anywhere in the plot area and the cursor becomes normal (as in the first image).
    The problem is not only in shape of the Windows cursor. The whole Graph cursor functionality does not work properly if the Windows cursor has the wrong shape.
    Please advise what could cause this problem.

    It seems, i cannot explain the question in good way
    It is not about my data or zooming. It is about strange bahaviour of the Graph. The following sequence of steps illustrates the problem and shows that the zooming is not the issue (or, at least, not the main issue):
    I do the following:
    1. Start the VI.
    2. Select first Graph cursor in Corsor palette and use pop-up menu "Bring to Center".
    3. Zoom couple of times (not too much) keeping the Grapg cursor visible.
    4. Select Cursor Movement Tool in the Graph Palette.
    5. "Open cross" Windows cursor appears from the beginning. I cannot pick up the Graph cursor.
    6. Click left button of the mouse several times in any poin of the graph area.
    7. Windows cursor is changed to the normal "cross with central point".
    8 Now I can pick up the Graph cursor.
    I would suspect problems with zoom until p.5. However p.6-8 are done without any change of the zoom.
    By the way, I found more:
    If I try to move the Graph cursor after p.5, the whole graph moves and fires event "Scale Range Change". It must not happen with Cursor Movement Tool selected.
    I can guess only about some strange setting of the graph. May be I am not aware about them

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • Capturing DVCAM in FCP 6.0.2 and encountering strange capture behavior

    I have FCP 6.0.2 and OSX 10.5.2 and QT 7.3.1. I have been capturing several DVCAM cassettes using my Sony DSR-20 deck. Although I have done this countless times before in earlier versions of FCP, I am encountering some strange repetitive behavior. I am capturing 30 minute clips one at a time. When I use batch capture it will cue the tape up properly to the in point...and then start capturing until it gets to about 10-12 minutes in, and then capture unexpectedly stops, no dialogue box, the tape rewinds and starts capturing again from the original in point. On this second capture, the tape sails past the 10 minute mark and keeps going to the end of the 30 minute clip. It then stops, gives me the dialogue box that it has successfully captured. And it has.
    But every DVCAM tape I captured today exhibited the same behavior. Capture would be successful until about about 10 minutes in, then FCP aborts (no dropped frame message, no dialogue box) rewinds the tape back to the in point, tries again, and this time succeeds with the second pass capturing the entire clip. Note at the 10 minute mark there is no scene change or no camera start/stop.
    Have other users experienced this issue? And if so, is there a workaround or a possible patch forthcoming from FCP?
    Many thanks,
    John

    Yes, each tape has an in and out point defined. In my 6 years of editing with Final Cut and DVCAM tapes I've never encountered this issue before in the capturing process until now. I will have to see in future weeks with other captures whether this is an on-going issue or not, but at least I can capture for now.

  • Some questions about Muse

    First of all, I would like to say that I am very impressed with how well Muse works and how easy it was to create a website that satisfies me. Before I started a daily updated website I thought I would encounter many problems I will not be able to solve. I have only had a few minor issues which I would like to share with you.
    The most problems I have with a horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html). Marking and copying of a text is possible only on the last (top) layer of a document. The same situation is with widgets or anything connected with rollover state - it does not work. In the above example it would be perfect to use a composition/tooltip widget on the first page. Unfortunately, you cannot even move the cursor into it.
    It would be helpful to have an option of rolling a mouse to an anchor (like in here http://www.play.pl/super-smartfony/lg-nexus-5.html and here http://www.thepetedesign.com/demos/onepage_scroll_demo.html).  I mean any action of a mouse wheel would make a move to another anchor/screen. It would make navigation of my site very easy.
    Is it possible to create a widget with a function next anchor/previous anchor? Currently, in the menu every button must be connected to a different anchor for the menu to be functional.
    A question about Adobe Muse. Is it possible to create panels in different columns? It would make it easier to go through all the sophisticated program functions.
    The hits from Facebook have sometimes very long links, eg.
    (http://www.leftlane.pl/sty14/mclaren-p1-nowy-krol-nurburgring.html?fb_action_ids=143235557 3667782&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582). If such a link is activated, the anchors in the menu do not work on any page. I mean the backlight of an active state, which helps the user to find out where on page they currently are. The problem also occurs when in the name of a html file polish fonts exist. And sometimes the dots does not work without any reason, mostly in the main page, sometimes in the cooperation page either (http://www.leftlane.pl/wspolpraca/). In the first case (on main page), I do not know why. I have checked if they did not drop into a state button by accident,  moved them among the layers, numbered them from scratch and it did not help. In the cooperation page, the first anchor does not work if it is in Y axle set at 0. If I move it right direction- everything is ok.
    The text frame with background fill does not change text color in overlay state (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html). I mean a source button at the beginning of every text. I would like a dark text and a light layer in a rollover, but  the text after export and moving cursor into it does not change color for some reason.
    I was not sure whether to keep everything (whole website) in one Muse file (but I may be mistaken?). I have decided to divide it into months. Everyone is in a different Muse file. If something goes wrong, I will not have any trouble with an upload of a whole site, which is going to get bigger and bigger.
    The problem is that every file has two master pages. Everything works well up to the moment when I realize how many times I have to make changes in upper menu when I need to add something there. I have already 5 files, every with 2 masters. Is there any way to solve this problem? Maybe something to do with Business Catalyst, where I could connect a menu to every subpage independently, deleting it from Muse file? Doing so I would be able to edit it everywhere from one place. It would make my work much easier, but I have no idea jendak how to do it.
    The comments Disqus do not load, especially at horizontal layouts  (http://www.leftlane.pl/sty14/2014-infiniti-q50-eau-rouge-concept.html). I have exchanged some mails and screenshots with Disqus help. I have sent them a screenshot where the comments are not loaded, because they almost never load. They have replied that it works at their place even with attached screenshot. I have a hard time to discuss it, because it does not work with me and with my friends either. Maybe you could fix it? I would not like to end up with awful facebook comments ;). The problem is with Firefox on PC and Mac. Chrome, Safari and Opera work ok.
    YouTube movie level layouts do not work well with IE11 and Safari 7 (http://www.leftlane.pl/sty14/wypadki-drogowe--004.html). The background should roll left, but in the above mentioned browsers it jumps up. Moreover the scrolling with menu dots is not fluent on Firefox, but I guess it is due to Firefox issues? The same layout but in vertical version rolls fluently in Firefox (http://www.leftlane.pl/sty14/polskie-wypadki--005.html).
    Now, viewing the website on new smartphones and tablets. I know it is not a mobile/tablet layout, but I tried to make it possible to be used on mobile hardware with HD (1280) display. I mean most of all horizontal layouts (http://www.leftlane.pl/sty14/2015-hyundai-genesis.html), where If we want to roll left, we need to roll down. Is there a way to make it possible to move the finger the direction in which the layout goes?
    On Android phones (Nexus 4, Android 4.4.2, Chrome 32) the fade away background effect does not work, although I have spent a lot of time over it (http://www.leftlane.pl/lut14/koniec-produkcji-elektrycznego-renault-fluence-ze!.html). It is ok on PC, but on the phone it does not look good. A whole picture moves from a lower layer instead of an edge which spoils everything.
    This layout does not look good on Android (http://www.leftlane.pl/sty14/nowe-mini-krolestwo-silnikow-3-cylindrowych.html#a07). The background does not fill the whole width of a page. There are also problems with a photo gallery, where full screen pictures should fill more of a screen.
    Is it possible to make an option of  scroll effects/motions for a fullscreen slideshow widget thumbnails (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06)? It would help me with designing layouts. Currently, it can go from a bottom of a page at x1 speed or emerge (like in this layout) by changing opacity. Something more will be needed, I suppose.
    Sometimes the pictures from gallery (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a06 download very slowly. The website is hosted at Business Catalyst. I cannot state when exactly it happens, most of the time it works ok.
    I really like layouts like this (http://www.leftlane.pl/sty14/2014-chevrolet-ss%2c-rodzinny-sedan-z-415-konnym-v8.html#a03). On the top is a description and a main text, and the picture is a filled object with a hold set at the bottom edge. That is why there is a nice effect of a filling a whole screen- nevertheless the resolution that is set. It works perfect on PC, but on Android the picture goes beyond the screen. You can do something about it?
    In horizontal layouts (http://www.leftlane.pl/sty14/dig-t-r-3-cylindrowy-silnik-nissana-o-wadze-40-kg-i-mocy-400- km.html) holding of a filling object does not work. Everything is always held to upper edge of a screen regardless the settings. Possibility of holding the picture to the bottom edge or center would make my work much easier.
    According to UE regulations we have to inform about the cookies. I do not know how to do it in Muse. I mean, when the message shows up one time and is accepted, there would be no need to show it again and again during another visit on the website. Is there any way to do it? Is there any widget for it maybe?
    The YouTube widget sometimes changes size just like that. It is so when the miniature of the movie does not load, and the widget is set to stroke (in our case 4 pixels, rounded to 1 pixel). As I remember ( in case of a load error) it extends for 8 pixels wide.
    Last but not least - we use the cheapest hosting plan in Business Catalyst. The monthly bandwidth is enough, although we have a lot of pictures and we worried about it at first. Yet we are running out of the disk storage very quickly. We have used more than a half of a 1 GB after a month. We do not want to change BC for a different one, because we like the way it is connected with Muse. But we do not want to buy the most expensive package - but only this one has more disk space. We do not need any other of these functions and it would devastate our budget. Do we have any other option?
    I’m using Adobe Muse 7.2 on OS X 10.9.1.
    and I'm sending Muse file to <[email protected]>

    Unfortunatley, there is no way to get a code view in Muse. I know quite a few people requested it in the previous forum, but not really sure where that ended up. Also, you may not want to bring the html into DW unless you only have 1 or 2 small changes 2 make. Two reasons. First, it isnt backwards compatible, so if you are planning on updating that site in Muse, you will need to make those changes in DW everytime you update. Second, by all accounts the HTML that Muse puts out is not pretty or easy to work with. Unlike you, I am code averse, but there was a lenghty discussion on the previous forum on this topic. I know they were striving to make it better with every release, just not sure where it is at this point.
    Dont think I am reading that second question right, but there was a ton of info on that old site. You may want to take a look there, people posted a ton of great unique solutions, so it worth a look.
    Here is the link to the old forums- http://support.muse.adobe.com/muse

  • Some questions about configuration in MAX.

    Hello,everyone!
    I have some questions about configuration in MAX(I am a jackaroo for motion control development),I hope I can get your help.
    I use PCI-7344+UMI-7764+Servo amplifier+Servo motor,my MAX version is 4.2 and I use NI-Motion7.5
    My question as following:
    1,In Axis Configuration,for motor type,why I must select stepper but not servo?my motor is servo motor!If I select Servo,my motor can't run,I don't know why.
     If I select stepper,though motor can work but I can't test encoder in MAX.
    2,In Stepper settings,for stepper loop mode,why I must select open-loop but not close-loop?If I select close-loop,the servo motor doesn't work too.
    3,If I want my two servo motors run at different velocity,How shoud I do?It seems I just can set the same velocity in MAX for my two servo motors.
     My English is poor,Pls pardon me!I come from China.
    Thank you for your help!
    EnquanLi
    Striving is without limit!

    Hi,Jochen,
    Thank you for your kindly help!
    The manufacturer of the drive and motor that I am using now is Japan SANYO DENKI,drive type is RS1A01AA,motor type is R2AA06020FXP00.
    And I use position control mode,thehe encoder's counts per revolution is 131072.I set the electronic gear ratio to 1:1 for drive.
    Now,I can use Close-Loop to control the motor but still has some problems.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.The detail situation is as following
    1,Motor can't run.
    2, Or motor moves to a position, then moves in the same direction agian and eventually stops.
    Except for the  two points mentioned above,"Following Error" is  occured frequently,I don't know why.
    I am still not clear why I must set the motor type be stepper in MAX .
    And I have another question:what the relationship between the steps and the counts?They have the proportion relations?I notice that there are a section said like this in help document: For proper closed-loop and p-command operation, steps per revolution/counts per revolution must be in the range of 1/32,767 < steps/counts < 32,767. An incorrect counts to steps ratio can result in failure to reach the target position and erroneous closed-loop stepper operation.
    I am verry sorry I have too many questions!
    I am very appreciate for your kingly help!Thanks again!
    EnquanLi
    China
    Striving is without limit!

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Two questions about SG300 DHCP server

    Hi,
    I have two questions about the DHCP server on the SG300:
    On the Address Binding page, what does the "Declined" state mean? I have a NAS device that won't pull an address, and I think that the entry with a state of "Declined" corresponds to this device. It was previously pulling an address from a RV180, so the only difference is that it is now connected to the SG300. I worked around this by manually setting the address on the NAS device, but this won't scale if I run into a lot of other devices that can't pull an address.
    I configured a static address binding for a WAP321 and found that instead of pulling the configured address that it pulled a dynamic address. I checked the Address Binding page and see that the dynamic entry that corresponds with the WAP321 has a Client Identifier rather than a MAC address. I changed the static entry for the WAP321 to use the client identifier displayed in the dynamic entry, and now the WAP321 pulls the configured static address. Is this expected behavior?
    Thanks,
    Bob

    With the SX300/500 it is required the client identifier, it doesn't automatically insert it. If static DHCP is made on the switch and you didn't need client identifier, that is more or less fortunate behavior for you
    So to answer this question, the expected behavior is to configure client identifier for static DHCP entry.
    -Tom
    Please mark answered for helpful posts
    http://blogs.cisco.com/smallbusiness/

  • Question about the programming of a legend

    Hello everybody,
    I have a question about the programming of a waveform's legend. I
    already asked here in this forum about the legend programming (03)
    months ago.
    I went satisfied but I ve just noticed that this code
    (See Code old_legend_test.llb with main.vi as main function) operates a
    little different from my expectances.
    Therefore I have a new question and I want to know if it
    is possible by labview programming to plot and show, on a waveform
    chart, a signal with activ plot superior to zero (0) without to be
    obliged to plot and show a signal with activ plot equal to zero (0) or
    inferior to the desired activ plot.
    I give you an example
    of what I m meaning. I have by example 4 signals (Signal 0, 1, 2 and 3)
    and each signal corresponds respectively to a channel (Chan1, Chan2,
    Chan3, Chan4). I want to control the legend (activ plot, plot name and
    plot color) programmatically. Is it possible with labview to plot signal
    1 or 2 or 3 or (1, 3) or (2,3) or (1,2,3) or other possible combination
    without to active the signal with the corresponding activ plot zero
    (0)?
    Let see the labview attached data
    (new_legend_test.llb with main.vi as main function). When I try to
    control the input selected values again I get them back but I don't
    understand why they have no effect on the legend of my waveform chart.
    Could somebody explain me what I m doing wrong or show me how to get a
    correct legend with desired plots? Thank by advance for your assistance.
    N.B.
    The
    both attached data are saved with labview 2009.
    Sincerly,PrinceJack
    Attachments:
    old_legend_test.llb ‏65 KB
    new_legend_test.llb ‏65 KB

    Hi
    princejack,
    Thanks for
    posting on National Instruments forum.
    The behavior
    you have is completely normal. You can control the number of row displayed in
    the legend and this rows are linked to the data you send to your graph. Thus,
    if you have 3 arrays of data, let say chan1, chan2 and chan3, you can choose
    which data you want to display in your graph using the property node (Active
    plot and visible). But for the legend as you send 3 plots there is an array of
    the plot name [chan1, chan2, chan3] and you can display 0, 1, 2 or 3 rows of
    this array but you cannot control the order in this array! So, to be able to
    change this array you have to only send data you need to you graph. I'm not
    sure my explanations are clear so I have implemented a simple example doing
    that.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/
    Attachments:
    GraphLegend.vi ‏85 KB

Maybe you are looking for

  • Need Suggestion for design

    Hi, My application is based on multiple forms. When user logged into application he has list of programs. Now each program has multiple forms which need to field step by step and at the last page it should save the data. So, right now as per our desi

  • IPhone 5 sound on video is almost nonexistent

    The iPhone 5 takes great video, but the sound is almost not there at all.  Husband still has his iPhone 4 and the sound is fine.  Any thoughts?  I looked at settings and the sound is all the way up, and it isn't a problem hearing messages, etc. 

  • Radio Button In Advanced Search View

    How to bring radio button in Advanced Search view in crm 7.0 web UI? Edited by: senthil06mx46 on Feb 18, 2010 9:50 PM

  • Opening images in emails

    When I open emails, the images do not open and simply appear as ?. Any idea how I can see images?

  • Interactive reports not working - am i missing something ?

    Hi. I just upgraded to apex 3.1 I wanted to test the interactive reports functionality. I can create the region with the query and i can set all the things under "report attributes". But when i run the page, i see the report with the initial data my