UDPWrite in a loop. "A Windows Sockets function call returned an unexpected error."

Hello together,
i use UDP Support Library in NI CVI 9.0. When i wait for receiving a packet at the pc to send then a packet from the pc, the functions UDPRead and UDPWrite work fine. If i want to test the maximum throughput, i put the UDPWrite in a loop, but then an error occurs. It is "kUDP_UnexpectedWinsockError"
Error Popup:
"NON-FATAL RUN-TIME ERROR:   "main.c", line 53, col 22, thread id
0x00000C18:   Library function error (return value == -6822
[0xffffe55a]). A Windows Sockets function call returned an unexpected
error."
Line 53:
status = UDPWrite (channel, 60100, "192.168.1.10", pOutputBuffer, 1458);
the whole loop:
while(1)
status = UDPWrite (channel, 60100, "192.168.1.10", pOutputBuffer, 1458);
counter++;
if(counter>50)
break;
else{;}
The error occurs after 3-16 packets have been sent. If i step through the programm, no error occurs. So i guess its because the UDPWrite command is invoked too fast. pOutputBuffer has static data. I could use a delay in the loop, but then i dont know how to configure for maximal throughput.
Any ideas how to avoid this error?
Regards Florian

Hello and thank you for your answer. Sorry that i reply a month later.
I dont know what you mean by "let 'er rip approach". Do you mean something like:
status = UDPWrite (channel, 60100, "192.168.1.10", pOutputBuffer, 1458);
if(status==0)
 counter++;
else
  Delay(0.00005);
I did not yet try to put the packet number in the payload, but there is just a 30 cm crossover cable between the two devices, no switch, no router. So the sequence should not be interruptet. And even if they arrive in chaos, i dont mind.
I have contacted the NI support 2 weeks ago, but no response yet.
I did some tests with a delay between the execution of UDPWrite(). The code:
float time = 0.0;
 for(i = 1; i < 1000; i++)
  status = UDPWrite (channel, 60100, "192.168.1.10", pOutputBuffer, 1458);
  time = 1.0 / i;
  Delay(time);
The results:
For i between 1 and 1000: no error, the speed of the last ten packets was about 6.5 MBit/s
For i between 1000 and 2000: error occured at i = 1585 (variable time in Delay was 0.0006313), the speed of the last ten packets was about 8 MBit/s
Then i put some constant values in Delay and ran 100 UDPWrite iterations:
Delay(0.0006): 7.48 MBit/s
Delay(0.0001): 10.7 MBit/s
Delay(0.00001): error occured at i=31, speed of 31 packets was 12.0 MBit/s
Delay(0.00008): 100 of 100 packets, speed 10.9 MBit/s
Delay(0.00005): error at i=41, speed of 41 packets 11.1 MBit/s

Similar Messages

  • The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.

    I am experiencing this error with one of our cluster environment. Can anyone help me in this issue.
    The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.
    Thanks,
    Venu S.
    Venugopal S ----------------------------------------------------------- Please click the Mark as Answer button if a post solves your problem!

    Hi Venu S,
    Based on my research, you might encounter a known issue, please try the hotfix in this KB:
    http://support.microsoft.com/kb/928385
    Meanwhile since there is less information about this issue, before further investigation, please provide us the following information:
    The version of Windows Server you are using
    The result of SELECT @@VERSION
    The scenario when you get this error
    If anything is unclear, please let me know.
    Regards,
    Tom Li

  • SLDCHECH: Function call returned exception code 3

    Hi all.
    I am trying to set up ESS and MSS on EP 6.0 SP15.
    I have configured the RFC destination, and when i do a test in RZ70 and SM59 everything is ok, but when i try running transaction SLDCHECK i get the following error:
    Use transaction SLDAPICUST if you wish to maintain the SLD server access data
    Launching the SLD GUI in a separate browser window...
    => Verify in the browser GUI that the SLD is in a healthy running state!
    Calling function LCR_LIST_BUSINESS_SYSTEMS
    Retrieving data from the SLD server...
    Function call returned exception code     3
    => Check whether the SLD is running!
    Summary: Connection to SLD does not work
    => Check SLD function and configurations
    Can anybody shead some light on this problem?
    Regards Liselotte

    Dear Liselotte,
    This will help you,
    http://help.sap.com/saphelp_nw04/helpdata/en/78/20244134a56532e10000000a1550b0/frameset.htm
    Might be Java version to the proxy settings. Try to go thru listed down various troubleshooting steps in following this weblog.
    Unable to open IR/ESR/ID ? (XI/PI/PI 7.1) [Updated for PI 7.1 support]
    Regards
    Agasthuri Doss

  • Windows Journal cannot open " ". An unexpected error occurred in Windows 7 Professional

    I copied my Windows Journal Notes from a tablet with Windows XP Tablet PC edition onto my Windows 7 Computer.  When I try to open a note from the pull down "look-in" menu within the Windows Journal program, I gives me the error
    "Windows Journal Cannot open.  An unexpected error occurred."  I thought this was a problem with my computer, BUT have replicated this same error on every computer in Best Buy and other computer stores.  This is not a problem with
    my personal notes.  This is a problem with the coding of the Windows Journal Software on Windows 7 and 8.  It was also tested on a Vista computer with the same error.
    Please, if someone knows how to fix this problem please let me know.  I use Windows Journal exclusively on a tablet PC for my business and am afraid of upgrading from XP to Windows 7 or 8 unless I can see that the Win7 version of JOURNAL works properly
    as the WinXP Tablet edition of Win Journal.
    Note: I have tried recreating user profiles, sfc.exe, cleanboot, safe mode, chkdisk.... all failed.  THE PROBLEM I BELIEVE IS THE ACTUAL CODE that is written for Windows Journal.  ALL notes can be opend by hitting FILE-OPEN.  However, if you
    go to the "view recent notes" button and click on the "look-in" pull down menu within the Windows Journal program, you can not open the file through this.  Because of the way I do my business, I need to look up various files quickly
    and write notes after opening each note from the "look-in" pull down menu.
    Please Help.

    The problem seems to be that the "look-in" menu doesn't open the files which are located in the "Notes" folder.  If I open the files through windows explorer in windows 7, the file opens into windows journal and appears in the look-in menu.
    Another interesting thing occurs if you create an additional folder under my documents.  I tested this on various computers in an electronic store:  Windows Journal was working fine with the "look-in" menu; I was able to open various journal note
    documents.  Then, once I created another folder under My Documents and tried to open a journal note in that folder and then go back to the "notes" folder, I was able to replicate the same error message.
    In short, it seems that once a new folder is created, the original folder "Notes" as well as the new folder, both do not allow for the files within them to be opened through the "look-in" menu.  However, they may be opened from hitting FILE, then OPEN. 
    But, the "look-in" and Browse menu doesn't work.
    Also, I looked in the Event Viewer and couldn't find anything in particular related to Win Journal.  Please tell me what and where specifically to look in the Event Viewer --- I can't seem to find anything related to Windows Journal errors in the Event
    Viewer.
    Thank you.

  • Multiple Select List looping thru PL/SQL function body returning SQL query

    Hi,
    I have a Multiple Select List. I want to loop through the values from the Select List and process them in a PL/SQL function body returning a SQL query. Currently, my code only returns the SQL SELECT results of one item in the select list. How do I change my code to make it return the results of all of the items in the select list? (I tested it and it is definitely picking up all the values in the select list).
    <b>
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s   VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
      FOR i in 1..selected_items.count LOOP
      s := TO_CHAR(selected_items(i));
    -- htp.p('First: '||s);
    -- htp.p('Second: '||:s);
    -- htp.p('Third: '||TO_CHAR(selected_items(i)));
      q:= 'SELECT  '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
      RETURN q;
      END LOOP;
    END;</b>
    Thank you,
    Laura

    Laura,
    First, I would be careful of introducing SQL Injection possibilities. Any time I see
    'Select ... ' || :P123_FOO || ' ... '
    I worry about sql injection. In your case you are converting :P50_SELECTED_INSTRUMENTS into selected_items and then selected_items into s. So when I see
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    I think, "I could use sql Injection and hack this."
    So, I would do some validation on :P50_SELECTED_INSTRUMENTS or some other method to avoid this.
    I'm not certain I understand your query. Do you really intend to allow the user to select the beginning of a string and then find all rows that start with that string? Or, do you just want to let them find when it matches the string. This is one way if you want to do matching:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(32767);
    q varchar2(32767);
    BEGIN
    -- Change the : separate string to be comma separated with quoted strings
    s := '''' || replace(:P50_SELECTED_INSTRUMENTS, ',', ''',''')|| '''' ;
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) in (' || s ||' ) '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    If you want to do something more like you originally stated, try this:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE 1=1 ';
    FOR i in 1..selected_items.count LOOP
    s := TO_CHAR(selected_items(i));
    q := q || ' and TO_CHAR(orig_geo_loc_sys) LIKE '''|| s ||'%'' ' ;
    END LOOP;
    q := q || ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    Hope this helps...
    Anton

  • Function Call returning old SQL Query

    Hello All,
    I have a Pipeline Function which creates a SQL within (Dynamic SQL that gets stored in a LONG variable) based on the parameter STRING passed to the function. Inside this function, once the SQL is built, I am inserting this SQL into a log table, for logging purpose.
    Note: my function has only one parameter which is a string. This string accepts a name:value pairs with a delimiter which I breakdown inside the function. But this functionality is working fine.
    Issue:
    When I run the function with parameter with a STRING say (Age = 20, Gender = M) for the first time, it works.
    <code>SELECT * FROM TABLE (
    PIPE_FUN_SEARCH_PKG.get_search_records ('EMP_AGE:20|EMP_GENDER:M'));
    </code>
    When I change the parameters to (Age = 20, Gender = F), it gives me the results of the earlier function call.
    <code>SELECT * FROM TABLE (
    PIPE_FUN_SEARCH_PKG.get_search_records ('EMP_AGE:20|EMP_GENDER:F'));
    </code>
    When I open the logs, I see the SQL being built is the earlier one.
    As a test I closed the session and ran (Age = 20, Gender = F) first. It works fine. When I run a different parameter string, it always mimics the earlier function call.
    Is CACHING in play here. I tried both the following:
    <code> dbms_result_cache.bypass(FALSE);
    dbms_result_cache.flush;
    </code>
    I tried multiple tests, with different parameters and only the first one runs fine and second one copied the earlier. However, when I open two sessions on two different windows it doesn't happen.
    Also, in the Logging table I am capturing the input string as a confirmation, which is coming correctly. But the SQL being build mimics the earlier call.
    I tried to set the variable which hold the SQL Statement to empty (v_sql := '';) at the beginning and also at the end. Still no use.
    Kindly help if I am over looking anything.
    Regards,
    Aj

    Aj09 wrote:
    I have a Pipeline Function which creates a SQL within (Dynamic SQL that gets stored in a LONG variable) based on the parameter STRING passed to the function. The LONG data type has been replaced by the LOB data type. Oracle specifically recommends not using the old LONG data type.
    Issue:
    When I run the function with parameter with a STRING say (Age = 20, Gender = M) for the first time, it works.
    <code>SELECT * FROM TABLE (
    PIPE_FUN_SEARCH_PKG.get_search_records ('EMP_AGE:20|EMP_GENDER:M'));
    </code>
    When I change the parameters to (Age = 20, Gender = F), it gives me the results of the earlier function call.
    <code>SELECT * FROM TABLE (
    PIPE_FUN_SEARCH_PKG.get_search_records ('EMP_AGE:20|EMP_GENDER:F'));
    </code>The tag is ** - not *<code>*.
    Why a pipeline function? Why dynamic SQL? Are you using +DBMS_SQL+ to create the dynamic cursor? If not, why not? Only +DBMS_SQL+ allows dynamic binding in PL/SQL. Without that, your code will burn a lot of additional CPU on hard parsing and trash and fragment Shared Pool memory.
    When I open the logs, I see the SQL being built is the earlier one.
    How do you record the current SQL? Are you using a static variable to capture the SQL statement generated?
    From what you have described - this is yet another horribly flawed approach in all respects. To data modelling. To relational databases. To Oracle. To SQL.
    Reinventing the SQL language for data retrieval as a pipeline function using a funky parameter interface - sorry, I just don't get that. It is an insane approach.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PL/SQL function body returning SQL - report error:ORA-01403: no data found

    Hi,
    I am working on Application Express 4.0.2.00.06, and 11G database.
    I have a problem with classic report area of type - PL/SQL function body returning SQL query. Query works if I define region area as - Use Generic Column Names (parse query at runtime only), and does not when I define it - Use Query-Specific Column Names and Validate Query.
    I am getting error:
    report error:ORA-01403: no data found
    This is my query that is returned from function, and displayed with htp.p, and it works ok and returns data in SQL Developer and SQL Workshop (in Apex).
    <code>
    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA
    </code>
    As you can see, I even tried with workaround that I found on the previous post on the forum, and that is to put /* select 1 from dual */ to start query.
    Any help would be appriciated.

    /* select 1 from dual */ SELECT SIFPRO, NAZIV, VODITELJ, DATPZA,SUM(DECODE(TJEDAN,'2010/46',BRDJEL,null)) as "2010/46" ,SUM(DECODE(TJEDAN,'2010/49',BRDJEL,null)) as "2010/49" ,SUM(DECODE(TJEDAN,'2010/50',BRDJEL,null)) as "2010/50" ,SUM(DECODE(TJEDAN,'2010/51',BRDJEL,null)) as "2010/51" ,SUM(DECODE(TJEDAN,'2010/52',BRDJEL,null)) as "2010/52" ,SUM(DECODE(TJEDAN,'2011/01',BRDJEL,null)) as "2011/01" ,SUM(DECODE(TJEDAN,'2011/02',BRDJEL,null)) as "2011/02" ,SUM(DECODE(TJEDAN,'2011/03',BRDJEL,null)) as "2011/03" ,SUM(DECODE(TJEDAN,'2011/04',BRDJEL,null)) as "2011/04" ,SUM(DECODE(TJEDAN,'2011/05',BRDJEL,null)) as "2011/05" ,SUM(DECODE(TJEDAN,'2011/06',BRDJEL,null)) as "2011/06" ,SUM(DECODE(TJEDAN,'2011/07',BRDJEL,null)) as "2011/07" ,SUM(DECODE(TJEDAN,'2011/08',BRDJEL,null)) as "2011/08" ,SUM(DECODE(TJEDAN,'2011/09',BRDJEL,null)) as "2011/09" ,SUM(DECODE(TJEDAN,'2011/10',BRDJEL,null)) as "2011/10" FROM (SELECT * FROM PMV_PLAN_TVRTKA) GROUP BY SIFPRO, NAZIV, VODITELJ, DATPZA ORDER BY SIFPRO, NAZIV, VODITELJ, DATPZA

  • Function call returned in ref cursor

    We have a ref cursor that calls a function in a package. When ODP.NET reads the cursor, it can't see what the function is returning. OO4O works fine, and if I take the sql that populates the ref cursor and put it into a temporary table, then select from that temporary table to return the ref cursor to ODP, it works fine. Anyone else seen this issue? Any help would be appreciated. Thanks.
    Eric Schrauth
    [email protected]

    Did you set the parameter direction to be ParameterDirection.Input when you created the parameter? Post your code.

  • SQL Query (PL/SQL function body returning SQL query) Error

    I'm an ApEx newbie, not a PL/SQL developer (more of a Web application developer) and I'm getting an error that prevents me from saving some PL/SQL code. I've looked over it all afternoon, but can't tell what's wrong. I may even be trying to do something inappropriately, or really stupid.
    The code is below. The error I get is - "Function returning SQL query: Query cannot be parsed within the Builder". Any help is appreciated, and thanks in advance. If you need more details of what I'm trying to do let me know.
    = = = = = = =
    DECLARE
    v_ID NUMBER;
    v_SITE_ID NUMBER;
    v_SITE_CODE VARCHAR2(15);
    v_ADDR1 VARCHAR2(240);
    v_CITY VARCHAR2(25);
    v_STATE VARCHAR2(150);
    v_ZIP VARCHAR2(20);
    v_ORG_ID VARCHAR2(10);
    BEGIN
    IF :G_ORG_ID = '' THEN
    SELECT "VENDOR_ID", "VENDOR_SITE_ID", "VENDOR_SITE_CODE", "ADDRESS_LINE1", "CITY", "STATE", "ZIP", "ORG_ID"
    INTO v_ID, v_SITE_ID, v_SITE_CODE, v_ADDR1, v_CITY, v_STATE, v_ZIP, v_ORG_ID
    FROM "PO_VENDOR_SITES_ALL_V"
    WHERE ("VENDOR_ID" = :P4_VENDOR_ID);
    ELSE
    SELECT "VENDOR_ID", "VENDOR_SITE_ID", "VENDOR_SITE_CODE", "ADDRESS_LINE1", "CITY", "STATE", "ZIP", "ORG_ID"
    INTO v_ID, v_SITE_ID, v_SITE_CODE, v_ADDR1, v_CITY, v_STATE, v_ZIP, v_ORG_ID
    FROM "PO_VENDOR_SITES_ALL_V"
    WHERE (("VENDOR_ID" = :P4_VENDOR_ID) AND ("ORG_ID" = :G_ORG_ID));
    END IF;
    END;

    Denes,
    Good question.
    Before I answer that question I'll give some detail on the application. That may help too. The application is a supplier search which searches the Oracle vendor tables (po.vendors, po_vendor_sites_all, po_vendor_contacts). The vendor/vendor site relationship is one to many. The site is based on the Org_ID. The supplier search is built to work solo, or to be called by another application. If it is called by another application one of the values passed is the Org_ID, so that only the sites that pertain to the user's org_id are shown. If the appl is called solo the Org_ID is not known, so the SQL should return all sites.
    I figured the easiest way to check if the program was running solo or was called was to check the G_ORG_ID value in my PL/SQL that builds the site report. You helped me with that code. (I am hiding buttons by checking if the G_ORG_ID field is null and they display/hide properly.)
    So, how is G_ORG_ID populated? It is on Page Zero, and is populated via the URL when the appl is called. (That aspect works great.) If it is called by another application G_ORG_ID is populated and my PL/SQL works. But, if the appl is called solo the field is not populated. When the PL/SQL runs I cannot get it to run the code for when G_ORG_ID is not populated.
    I am at the point that I don't know if I need to populate G_ORG_ID in some way when the appl is running solo (kinda tricky, because I need to use that field to determine if it is running solo), or if I need to check it differently in the PL/SQL IF.
    I have experimented with both the default value, and have checked for different values in the PL/SQL IF, but nothing works.
    Thanks for your help, and let me know if you have any other questions on this matter.
    Thanks, Tony

  • Socket read() call returning before timeout.

    I have a couple of applications which use the following basic socket reading approach:
    Socket socket = new Socket("192.168.0.1", 54321);
    socket.setSoTimeout (5000);
    InputStream stream = socket.getInputStream();
    byte[] data = new byte[232];
    boolean done = false;
    while (!done) {
        int res= stream.read(data);
        if (res < data.length) {
            System.err.println ("Error reading packet data - not enough data received: "+ res);
        // process and output the data
    try { stream.close(); } catch (Exception e) {}
    try { socket.close(); } catch (Exception e) {}The problem I am having is that sometimes read(byte[]) returns a before the full array's worth of data has been read, and before a timeout has occurred. I never get a SocketTimeoutException, but I do get my debugging output. I have recorded the network traffic with a packet sniffer (Wireshark), and what I am seeing is that in the instances where the read returns prematurely, it stops at the end of a TCP packet. The rest of the data is in another packet that arrives shortly afterwords (~1.5 ms or less).
    I know that with normal (file) input streams, read can return whenever it wants regardless of how many bytes were read, however I was under the impression that network streams are supposed to block until all the data arrives (or a timeout occurs, if set). Is this incorrect?

    djpeaco wrote:
    I know that with normal (file) input streams, read can return whenever it wants regardless of how many bytes were readThat's correct and that's exactly the reason you see the behavior you see.
    however I was under the impression that network streams are supposed to block until all the data arrives (or a timeout occurs, if set).Why? Why do you think that network streams behave differently in this regard?
    Why shouldn't it give you the data as soon as it's available, when every other stream works this way?
    Is this incorrect?Yes, you must assume that the streams of a socket follow the general InputStream/OutputStream contract and that includes possibly returning from read() before the full array is filled.

  • Windows 7 time sync returns Access Denied error

    I have recently configured my AD PDC Windows 2008 Server to syncronize with time.windows.com.  I am trying to get my AD Windows 7 Pro clients to sync with the server, however anytime I run w32tm /resync, net stop w32tm or net start w32tm I get an
    Access Denied error on the client.  I have tried it logged in as both the domain admin and the local admin.  For some reason I can start and stop the W32 Time Service from the Services console, but it doesn't resync the time when it restarts.  Why
    am I being denied access when logged in as the domain administrator?  

    Hi,
    Did you set any group policy to prevent client from changing the services?
    I suggest you take the ownership of %WINDIR%\System32\W32TM.EXE, disable the security software and firewall on both side to check the result. Also re-configure the
    group policy related to Windows Time Service and re-apply them.
    In addition, I suggest contacting Server Forum to confirm with the issue.
    Win Server Forum
    http://social.technet.microsoft.com/Forums/en-US/category/windowsserver
    Best Regards,
    Niki
    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • NiRFSA_Rea​dPowerSpec​trumF64 function call in TestStand 4.5.1 cause system error

    I am using TestStand with niRFSA.dll to call the function niRFSA_ReadPowerSpectrumF64. This function will make the NI RFSA takes a spectrum sweep and return an array of amplitudes, as well as a structure that contains the frequencies information. My teststand sequence file is attached. The sequence editor will execute this function call, and actually retrieve correct data from the RFSA, I can see all the data in the Locals variables. The data are correct. However, the sequence editor also throws out system error, with no further details.
    See the error window also attached.
    Once in a while, the sequence editor will work just fine, executing the same function call without throwing out error, this is less than 10% of the time.
    I am using this on Windows 7.
    Let me know if you have any insight.
    Attachments:
    RFSA Sequence.seq ‏7 KB
    Capture.JPG ‏33 KB

    Hi Doug:
    Yes this is what I suspected also. Since the container type was a TS custom type I created to accept the C struct from the instrument. But when the data come back from the dll is a C struct, and there lays the conflict, I think its the packaging layer semantics have some conflict, even though each of the element in the C struct matches the TS type definitions, as I received all that data correctly in TS.
    Thanks,
    Juswanto

  • The system cannot find the file specified.Windows sockets error code:2.

    Hi All,
      I am on MDM 5.5 SP6.
      I am getting the following error message when trying to logging in to the DM.
    The system cannot find the file specified.Windows sockets error code:2.This application will now exit.
    Runtime Error :
    Program C :\Program Files\SAP MDM 5.5\Data Manager\Datamanager.exe
    R6025.
    -Pure virtual function call.
    And in console also the MDM server is stopped after getting the above error message.
    Can anybody tell me what could be the problem?
    Thanks & Regards
    Sireesha.

    Hi Sireesha,
    According to me, there can be 3 problems,
    1. Kindly check whether the MDM server is stopped. If it is, then restart the MDM Server and Load the repository with Update indices.
    2. If this error is coming with every repository, the problem will be either in the Version mismatch of the Server and the GUI's you are using. Kindly ensure that the versions for the MDM server and the MDM Gui's Match.
    3. If only Data manager Client is giving the problem, then you can un-install and install the DM GUI again.
    Along with this, please refer to the link below :
    [[The system cannot find the file specified.Windows sockets error code:2.;]
    Hope it helps.
    Thanks and Regards
    Nitin jain

  • Unable to connect to the server - windows sockets

    //////socket connector method////
    bool SocketConnecter::connect(const std::string& ip, size_t port)
    size_t uport = htons(port);
    std::string sPort = toString(uport);
    // Resolve the server address and port
    const char* pTemp = ip.c_str();
    iResult = getaddrinfo(pTemp, sPort.c_str(), &hints, &result); // was DEFAULT_PORT
    if (iResult != 0) {
    Verbose::show("\n -- getaddrinfo failed with error: " + toString(iResult), always);
    return false;
    // Attempt to connect to an address until one succeeds
    for (ptr = result; ptr != NULL; ptr = ptr->ai_next) {
    char ipstr[INET6_ADDRSTRLEN];
    void *addr;
    char *ipver;
    // get pointer to address - different fields in IPv4 and IPv6:
    if (ptr->ai_family == AF_INET) { // IPv4
    struct sockaddr_in *ipv4 = (struct sockaddr_in *)ptr->ai_addr;
    addr = &(ipv4->sin_addr);
    ipver = "IPv4";
    else { // IPv6
    struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)ptr->ai_addr;
    addr = &(ipv6->sin6_addr);
    ipver = "IPv6";
    // convert the IP to a string and print it:
    inet_ntop(ptr->ai_family, addr, ipstr, sizeof ipstr);
    printf("\n %s: %s", ipver, ipstr);
    // Create a SOCKET for connecting to server
    socket_ = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
    if (socket_ == INVALID_SOCKET) {
    int error = WSAGetLastError();
    Verbose::show("\n -- socket failed with error: " + toString<int>(error), always);
    return false;
    iResult = ::connect(socket_, ptr->ai_addr, (int)ptr->ai_addrlen);
    if (iResult == SOCKET_ERROR) {
    socket_ = INVALID_SOCKET;
    int error = WSAGetLastError();
    Verbose::show("WSAGetLastError returned " + toString(error));
    continue;
    break;
    freeaddrinfo(result);
    if (socket_ == INVALID_SOCKET) {
    int error = WSAGetLastError();
    Verbose::show("\n -- unable to connect to server, error = " + toString(error));
    return false;
    return true;
    /////////Test stub////
    int main()
    title("Testing Socket Client", '=');
    try
    Verbose v(true);
    SocketSystem ss;
    SocketConnecter si;
    while (!si.connect("localhost", 9080))
    Verbose::show("client waiting to connect");
    ::Sleep(100);
    title("Starting string test on client");
    clientTestStringHandling(si);
    title("Starting buffer test on client");
    clientTestBufferHandling(si);
    si.sendString("TEST_STOP");
    Verbose::show("\n client calling send shutdown\n");
    si.shutDownSend();
    catch (std::exception& ex)
    Verbose::show(" Exception caught:", true);//always = true
    Verbose::show(std::string("\n ") + ex.what() + "\n\n");
    I am trying to connect to the server, but the connector method shows the message "unable to connect to server" 
    While debugging i found the iResult to be -1 which makes the socket INVALID_SOCKET
    Kindly help resolve this

    Hi askatral,
    connect function can return invalid_socket for many reasons, what does the function WSAGetLastError return?
    There are some Variables that I cannot find how it is declared, like "socket_" and "ptr". So I cannot check if there is anything wrong in your code.
    Maybe this sample in the document of connect function is helpful for this issue:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms737625(v=vs.85).aspx
    Best regards,
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to refresh the text which is display by windows API function 'findwindow' 'getdc' 'textout'!

    i use the windows api function to dynamelly display text on the frontpanel ,it successed ,but when you move the scrollbar to the left ,right ,top ,bottom,the text will be disappear!! i think it is a very difficulteed problem .in my around ,no one can do! who can help me!
    Attachments:
    textrefresh.vi ‏21 KB
    auto_appear_scroll.vi ‏126 KB

    Very cool!
    It looks like you are using the same functions that LV uses to refresh the screen. Thos functions only let you update within the window you specify. This is why your updates stop at teh edge of the window.
    Normally LV will watch the scroll bar position and re-paint the screen to reflect an scroll bar postion changes. Since you are by-passing LV, you can not rely on LV to refresh your screen when the scroll bars move.
    At this point I can offer two suggestions.
    1) Continue with the approach you started and start adding all of the code required to watch the scroll bars and re-paint as indicated.
    or
    2) Look into the LV Picture control. Based on what you have done using dll calls I would guess that you could probably figure how to do the
    same thing using a picture control. The Picture (being a LV native object) is fully supported by LV so the scrolling work is already done and working. The picture control will let you draw lines, insert text, etc. Take a look at the "Robot Arm" example. It should get you started.
    Finally, the Picture control is pure "G" so it should be platform independent.
    Otherwise let me commend you on your example. You say no one else where you are can do what you have done. After looking at your example, I am not suprised. There are few people in the world that can do what you have done.
    Great work!
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAutomation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Video Chat Failure

    I posted this question yesterday and I am still trying to find out the answer. I am still not sure of the reason I cannot connect a video chat with my friend because I have been given multiple reasons of why the connection cannot be made. I have trie

  • How to resize logo in AI file for use on web page? [was: new with  this program]

    Hola , i got my logo and the online company  sent it in low resolution, I asked for the proper resolution for my web page and the company sent me this : The AI (Vector) file(s) in the zip file are to be utilized for all high-res. and commercial print

  • Based on Payment terms make Manditory field in Billing DOc

    Dear all, I am trying to find LCNUM field in Billing document field.If i check in Table level i can able to see the field..but if i go to VF02 that field is not appearing ,WHere can i see the field. Req: I need to make the Mandatory field as Financia

  • Studying for Oracle 11g Performance and Tuning exam - 1Z0-054

    Hello all, I want to attend to this exam and I'm looking for interesting and usefull studying path. Sure manuals on tahiti are needed. Neither sefltestsoftware not Testking has released a proficiency test for this exam. I was only able to find a test

  • Issues to be aware of when upgrading from SP1 to SP7

    Dear All, We are planning to upgrade from SP1 to SP7 of Microsoft version of SAP BPC. Are there any major pitfalls that we should be aware of with this upgrade? Is SP7 a stable release? Thanks in advance, Mark