Error in sample code UseMatrix

oForm = SBO_Application.Forms.AddEx(creationPackage)
At the above statement following error is fired,
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occured in Project.Exe
Additional information :Form already exists [6600-11]

hi dilip,
i tried the same code. it is working fine..
as u told, u r facing a error "form already exist"..
just do one thing, close and reopen SAP Business one..
then it will work...
hope it wil work..
if satisfied, rewards good points.
regards
nirdesh

Similar Messages

  • Error in sample code

    How come we have so many errors in Jdeveloper sample code for creating db schema.

    You will really have to provide more information (what errors, what are you trying to do), because no one will be able to do anything with this kind of limited information.

  • Error runnning sample code on 64 bit windows

    Hello,
    I am using VS 2010 express to execute the sample SAP connector client code provided by dataxstream on windows 7 and I have installed the 64 bit version of the connector. I added the references required to execute the code, but I get the below mentioned error. Can someone tell me what am I missing here?
    Could not load file or assembly 'sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    Thanks

    Note the header of this forum:
    This forum is dedicated to development and deployment of .Net applications
    that connect and interact with BusinessObjects Enterprise, BusinessObjects
    Edge, or Crystal Reports Server. This includes the development of applications
    using the BusinessObjects Enterprise, Report Application Server, Report
    Engine, and Web Services SDKs.
    Looks to me like you posted in an incorrect forum. Unfortunately I am not sure what forum may be best for you. Checking with your account manager may be the way to go(?).
    - Ludek

  • Error on sample code Oracle's JMS Resource Adapter for WebSphere MQ Series

    Hi,
    I've succesfully assembled and deployed demo application located at the following url
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-mq-jms/doc/how-to-mq-jms.html
    However, during testing of the app, i've discovered strange error: It seems that
    instead of 6 messages returned only 3 messages (those replies generated by MDB), while 3 messages expected to be rolled back to the queue are disappeared.
    After turning trace on MQ i've discovered that for some reason MDB commits after every transaction, even if setRollbackOnly() method id called.
    I.e. log contains 12 XACOMMIT() calls ( 9 call for 9 messages being consumed by the MDB and 3 for 3 messages being submited as replies), while it's supposed to contain only 9 commits.
    Could you explain why this happens ?
    I've trace files and OC4J output at hand if you're might interested.

    Shouldn't I be getting a com.evermind.sql.OrclCMTConnection created instead of a com.evermind.sql.OrionCMTConnection (per the stack trace)? OJMS is complaining that it doesn't have an OracleCOnnection but how do I tell it to use the "OrclCMTConnection" class instead?
    Brian

  • Error while running a sample code

    Hello,
    I 'm getting the following error while i'm trying to run a
    sample code which I have imported into Flex 3.
    ===================================================================
    Severity and Description Path Resource Location Creation Time
    Id
    unable to open 'C:\Documents and Settings\sn55179\My
    Documents\Flex Builder
    3\FlexForDummies_Chapter3_Code\libs'FlexForDummies_Chapter3_Code
    Unknown 1237909480511 215
    ===================================================================
    Can anyone help me in resolving this issue.
    Many thanks in advance.

    It's very frustrating that FB stops working when the libs
    folder is missing. If you are checking in project files to a source
    control app like Perforce, empty folders don't get added, so if you
    don't add an initial dummy file, the next time you do a clean sync,
    the libs folder may not be there, and even though there is nothing
    there, FB complains. :-(

  • Error while compiling CS5.5 sample code

    Hi,
    I have just started on using InDesign CS5.5. I am trying to compile the sample code on Windows 7 and with Visual Studio 2008. On compilation it is giving me an error of SDKLib.sdk.lib
    "LINK : fatal error LNK1181: cannot open input file '..\..\..\build\win\objr\SDKLib.sdk.lib'"
    Have I missed some settings. I have set the Bin folder in the tools option. If anyone knows about this error please do let me know.
    Thanks all in advance.
    Regards,
    Farzana.

    Hi to all again,
    I just noticed that I don't have the SDKLib.sdk.lib file in the folder. Neither for Debug or for Release I have this file. Do I need to download this from somewhere??
    Thanks in advance.
    Regards
    Farzana.

  • Error in XSQL Sample code ?!

    Hi,
    I recently tried the XSQL sample code with the latest (1.0.0.0 ?) version of the XSQL sevlet. But there seems to be an error in the example:
    In the hotels.xsql file (inside XSQLSample.jar, inside XMLUtilitySamples.zip)
    the query tags are specified as
    <query connection="xmlutil" rowset-element="Hotels" row-element="Hotel" >
    But I only got the example working with :
    <xsql:query xmlns:xsql="urn:oracle-xsql" .....>
    (both in the apache-jserv environment, as well as in the web-to-go server.
    Is the example indeed incorrect, or did I do sth wrong in trying to get the example to work ?
    -- olaf
    null

    The examples in that .zip file apparently were only tested by their author with a pre-0.9.8.6 version of XSQL Servlet.
    XSQL version 0.9.8.6 and later required the "xsql" namespace prefix.
    I'll find out who built the examples and get them corrected. Thanks for the tip.

  • Hi guys please give me sample code for call transaction that handles error

    hi guys, please give me sample code for call transaction that handles error,
    please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code.
    please do help me as it is urgent.
    thanks and regards.
    prasadnn.

    Hi Prasad,
    Check this code.
    Source Code for BDC using Call Transaction
    *Code used to create BDC
    *& Report  ZBDC_EXAMPLE                                                *
    *& Example BDC program, which updates net price of item 00010 of a     *
    *& particular Purchase order(EBELN).                                   *
    REPORT  ZBDC_EXAMPLE  NO STANDARD PAGE HEADING
                          LINE-SIZE 132.
    Data declaration
    TABLES: ekko, ekpo.
    TYPES: BEGIN OF t_ekko,
        ebeln TYPE ekko-ebeln,
        waers TYPE ekko-waers,
        netpr TYPE ekpo-netpr,
        err_msg(73) TYPE c,
    END OF t_ekko.
    DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko  TYPE t_ekko,
          it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_error TYPE t_ekko,
          it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_success TYPE t_ekko.
    DATA: w_textout            LIKE t100-text.
    DATA: gd_update TYPE i,
          gd_lines TYPE i.
    *Used to store BDC data
    DATA: BEGIN OF bdc_tab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Used to stores error information from CALL TRANSACTION Function Module
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    *Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                        TITLE text-001. "Purchase order Num
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                        TITLE text-002. "New NETPR value
    PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
    SELECTION-SCREEN END OF BLOCK block2.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Retrieve data from Purchase order table(EKKO)
      SELECT ekkoebeln ekkowaers ekpo~netpr
        INTO TABLE it_ekko
        FROM ekko AS ekko INNER JOIN ekpo AS ekpo
          ON ekpoebeln EQ ekkoebeln
       WHERE ekko~ebeln IN so_ebeln AND
             ekpo~ebelp EQ '10'.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Check data has been retrieved ready for processing
      DESCRIBE TABLE it_ekko LINES gd_lines.
      IF gd_lines LE 0.
      Display message if no data has been retrieved
        MESSAGE i003(zp) WITH 'No Records Found'(001).
        LEAVE TO SCREEN 0.
      ELSE.
      Update Customer master data (instalment text)
        LOOP AT it_ekko INTO wa_ekko.
          PERFORM bdc_update.
        ENDLOOP.
      Display message confirming number of records updated
        IF gd_update GT 1.
          MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
        ELSE.
          MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
        ENDIF.
    Display Success Report
      Check Success table
        DESCRIBE TABLE it_success LINES gd_lines.
        IF gd_lines GT 0.
        Display result report column headings
          PERFORM display_column_headings.
        Display result report
          PERFORM display_report.
        ENDIF.
    Display Error Report
      Check errors table
        DESCRIBE TABLE it_error LINES gd_lines.
      If errors exist then display errors report
        IF gd_lines GT 0.
        Display errors report
          PERFORM display_error_headings.
          PERFORM display_error_report.
        ENDIF.
      ENDIF.
    *&      Form  DISPLAY_COLUMN_HEADINGS
          Display column headings
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records updated successfully:'(013).
      WRITE:/ sy-uline(42).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(004), sy-vline,
              (11) 'Old Netpr'(005), sy-vline,
              (11) 'New Netpr'(006), sy-vline.
      WRITE:/ sy-uline(42).
    ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
    *&      Form  BDC_UPDATE
          Populate BDC table and call transaction ME22
    FORM bdc_update.
      PERFORM dynpro USING:
          'X'   'SAPMM06E'        '0105',
          ' '   'BDC_CURSOR'      'RM06E-BSTNR',
          ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
          ' '   'BDC_OKCODE'      '/00',                      "OK code
          'X'   'SAPMM06E'        '0120',
          ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
          ' '   'EKPO-NETPR(01)'  p_newpr,
          ' '   'BDC_OKCODE'      '=BU'.                      "OK code
    Call transaction to update customer instalment text
      CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
             MESSAGES INTO messtab.
    Check if update was succesful
      IF sy-subrc EQ 0.
        ADD 1 TO gd_update.
        APPEND wa_ekko TO it_success.
      ELSE.
      Retrieve error messages displayed during BDC update
        LOOP AT messtab WHERE msgtyp = 'E'.
        Builds actual message based on info returned from Call transaction
          CALL FUNCTION 'MESSAGE_TEXT_BUILD'
               EXPORTING
                    msgid               = messtab-msgid
                    msgnr               = messtab-msgnr
                    msgv1               = messtab-msgv1
                    msgv2               = messtab-msgv2
                    msgv3               = messtab-msgv3
                    msgv4               = messtab-msgv4
               IMPORTING
                    message_text_output = w_textout.
        ENDLOOP.
      Build error table ready for output
        wa_error = wa_ekko.
        wa_error-err_msg = w_textout.
        APPEND wa_error TO it_error.
        CLEAR: wa_error.
      ENDIF.
    Clear bdc date table
      CLEAR: bdc_tab.
      REFRESH: bdc_tab.
    ENDFORM.                    " BDC_UPDATE
          FORM DYNPRO                                                   *
          stores values to bdc table                                    *
    -->  DYNBEGIN                                                      *
    -->  NAME                                                          *
    -->  VALUE                                                         *
    FORM dynpro USING    dynbegin name value.
      IF dynbegin = 'X'.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-program,
               value TO bdc_tab-dynpro,
               'X'  TO bdc_tab-dynbegin.
        APPEND bdc_tab.
      ELSE.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-fnam,
               value TO bdc_tab-fval.
        APPEND bdc_tab.
      ENDIF.
    ENDFORM.                               " DYNPRO
    *&      Form  DISPLAY_REPORT
          Display Report
    FORM display_report.
      FORMAT COLOR COL_NORMAL.
    Loop at data table
      LOOP AT it_success INTO wa_success.
        WRITE:/      sy-vline,
                (10) wa_success-ebeln, sy-vline,
                (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
                (11) p_newpr, sy-vline.
        CLEAR: wa_success.
      ENDLOOP.
      WRITE:/ sy-uline(42).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  DISPLAY_ERROR_REPORT
          Display error report data
    FORM display_error_report.
      LOOP AT it_error INTO wa_error.
        WRITE:/      sy-vline,
                (10) wa_error-ebeln, sy-vline,
                (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
                (73) wa_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    ENDFORM.                    " DISPLAY_ERROR_REPORT
    *&      Form  DISPLAY_ERROR_HEADINGS
          Display error report headings
    FORM display_error_headings.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(009), sy-vline,
              (11) 'Netpr'(010), sy-vline,
              (73) 'Error Message'(012), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    " DISPLAY_ERROR_HEADINGS
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Assert error/hangs running the performance sample code

    Hi,
    I'm doing some work to understand how fast I can expect Berkeley DB to run and I found the 2006 white paper on [Performance Metrics and Benchmarks|http://www.oracle.com/technology/products/berkeley-db/pdf/berkeley-db-perf.pdf] so I downloaded the [sample code|http://www.oracle.com/technology/products/berkeley-db/files/perf.zip] and made a couple of fixes to make it run with 4.7.25 (shown at the end).
    When I run 'make test' it frequently hangs on the "Transactional Data Store (write, in-memory logging)" test under OS X 10.5.7 and under Debian lenny (kernel 2.6.26-1-amd64).
    If I rebuild BDB with --enable-diagnostic I get this assertion error.
    jmeredith@op:~/src/perf$ rm -rf TESTDIR ; ./t
    Using Berkeley DB 4.7.25 - ops: 1000000; keysize: 8; datasize: 32
    Data Store (read):
    elapsed time: 0.392573 seconds : 2.5473e+06 key/data pairs per sec
    Data Store (bulk read):
    elapsed time: 1.615233 seconds : 2.66339e+07 key/data pairs per sec
    Data Store (write):
    elapsed time: 0.629771 seconds : 1.58788e+06 key/data pairs per sec
    Transactional Data Store (read):
    elapsed time: 2.413665 seconds : 414308 key/data pairs per sec
    assert failure: ../dist/../txn/txn_region.c/451: "td->mvcc_ref > 0"
    [0x4f431d]
    [0x4f41a9]
    [0x44cdff]
    [0x4f2e1e]
    [0x42f0d3]
    [0x4f3faf]
    [0x4fddee]
    [0x4f8dde]
    [0x4d975c]
    [0x4c9991]
    [0x4e417d]
    [0x40137c]
    [0x40198e]
    [0x52613b]
    [0x4001b9]
    Aborted (core dumped)
    Here are the changes to get the code to build.
    --- perf/t.c 2006-06-28 17:15:47.000000000 -0600
    +++ perf-fixed/t.c 2009-07-06 09:44:43.000000000 -0600
    @@ -1,4 +1,5 @@
    #include <sys/types.h>
    +#include <sys/time.h>
    #include <stdio.h>
    #include <stdlib.h>
    @@ -38,7 +39,15 @@
    char *progname;
    -extern void __os_clock(DB_ENV *, u_int32_t *, u_int32_t *);
    +void
    +__os_clock(DB_ENV e, u_int32_t secs_ptr, u_int32_t *usecs_ptr)
    +{
    + struct timeval t;
    +
    + gettimeofday(&t, NULL);
    + *secs_ptr = (u_int32_t) t.tv_sec;
    + *usecs_ptr = (u_int32_t) t.tv_usec;
    +}
    void cleanup(void);
    void op_ds(u_int, int);
    @@ -364,7 +373,7 @@
    op_tds(ops, 0, 0);
    res("Transactional Data Store (read):", ops);
    - op_tds(ops, 1, DB_LOG_INMEMORY);
    + op_tds(ops, 1, DB_LOG_IN_MEMORY);
    res("Transactional Data Store (write, in-memory logging):", ops);
    op_tds(ops, 1, DB_TXN_NOSYNC);

    Hi,
    I reproduced your problem on Ubuntu 4.2.3 with db 4.7.25 and saw the same assert error as you. From the error message, the program asserts error/hangs at the "Transactional Data Store (write, in-memory logging)", that is calling op_tds() with DB_LOG_IN_MEMORY as the flags.
    The problem comes from your change on the sample code that the DB_LOG_IN_MEMORY is set with wrong API. The DB_LOG_IN_MEMORY should be set in DB_ENV->log_set_config(). Please refer to [DB_ENV->log_set_config|http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_log_set_config.html] and its flag DB_LOG_IN_MEMORY.
    I change env's setting flags in op_tds() as follows. In this way, the error I saw is eliminated and the program works as expected.
    The original code is:
    PERF_CHECK(
            dbenv->set_flags(dbenv, DB_AUTO_COMMIT | txn_flags, 1) == 0);"
    {code}
    I change it to:
    {code}
    if (txn_flags == DB_LOG_IN_MEMORY) {
            PERF_CHECK(
               dbenv->log_set_config(dbenv, DB_LOG_IN_MEMORY, 1) == 0);
            txn_flags = 0;
    PERF_CHECK(
            dbenv->set_flags(dbenv, DB_AUTO_COMMIT | txn_flags, 1) == 0);
    {code}
    Please apply the change and l*et us know if it works on your machine.
    Regards,
    Emily Fu, Oracle Berkeley DB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Class mapping sample code error

    Hi !
    There is an error in a Developers guide mapping sample code: p.156-157.
    (Examples 7.11,7.12 and 7.13).
    For example, in 7.12 we have:
    <class name="Tabloid" persistence-capable-superclass="Magazine">
    <extension vendor-name="kodo" key="jdbc-class-map" value="flat"/>
    .... indicator extensions ...
    .... field metadata ...
    </class>
    instead of jdbc-use-class-map in the key attrribute of the extention tag.
    Please, fix it.
    Best regards,
    Alex.

    Actually the sample is correct. It shows the mapping information if you
    are using metadata extensions in place of .mapping files. To map a class
    via metadata extensions, you use the "jdbc-class-map" extension key.
    This is distinct from the "jdbc-use-class-map" key, which you can use to
    tell the mapping tool what kind of mapping it should create. So in sum:
    jdbc-class-map: Used at runtime by the MetaDataMappingFactory to map a
    class to its schema.
    jdbc-use-class-map: Used at dev time by the MappingTool to indicate that
    the user wants a specific type of mapping to be installed.

  • ADC sample code MapLargeFile.c returns an error

    I need some help running sample code from the ADC web site. I'm running 10.5.6 on a Mac Pro with 6 GB of RAM.
    The example in question "Shows a technique for mapping files greater than 4GB into memory for faster access."
    I compile it like this:
    gcc MapLargeFile.c -o MapLargeFile
    Then I make a 6GB file like this:
    dd if=/dev/zero of=foobar.txt bs=1024 count=6291456
    Finally I run it like this:
    ./MapLargeFile foobar.txt
    The program fails with this warning:
    ./MapLargeFile: failed to mmap file at offset 0x0
    I get the same error message if I give it a nonexistent file name. Looking at the code I would think it would say it couldn't open the nonexistent file.
    What am I doing wrong?
    Here is the sample code from the Apple ADC site:
    File: MapLargeFile.c
    Description: Shows a technique for accessing files > 4GB in size.
    Copyright: © Copyright 2003 Apple Computer, Inc. All rights reserved.
    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
    ("Apple") in consideration of your agreement to the following terms, and your
    use, installation, modification or redistribution of this Apple software
    constitutes acceptance of these terms. If you do not agree with these terms,
    please do not use, install, modify or redistribute this Apple software.
    In consideration of your agreement to abide by the following terms, and subject
    to these terms, Apple grants you a personal, non-exclusive license, under Apple's
    copyrights in this original Apple software (the "Apple Software"), to use,
    reproduce, modify and redistribute the Apple Software, with or without
    modifications, in source and/or binary forms; provided that if you redistribute
    the Apple Software in its entirety and without modifications, you must retain
    this notice and the following text and disclaimers in all such redistributions of
    the Apple Software. Neither the name, trademarks, service marks or logos of
    Apple Computer, Inc. may be used to endorse or promote products derived from the
    Apple Software without specific prior written permission from Apple. Except as
    expressly stated in this notice, no other rights or licenses, express or implied,
    are granted by Apple herein, including but not limited to any patent rights that
    may be infringed by your derivative works or by other works in which the Apple
    Software may be incorporated.
    The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
    WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
    WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
    COMBINATION WITH YOUR PRODUCTS.
    IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
    OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
    (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Change History (most recent first):
    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <sys/time.h>
    #include <unistd.h>
    #include <fcntl.h>
    #include <sys/types.h>
    #include <sys/mman.h>
    struct timeval lastTime, thisTime;
    This sample is set up to map a 6GB file into memory in 256MB chunks.
    #define kFileSize (0x180000000ULL) // size of file we expect to map = 6GB
    #define kBufferSize (0x10000000UL) // we will map it in 256MB chunks
    int main( int argc, const char *argv[] )
    int fd, cnt, loops;
    unsigned long long *buffer, sum;
    off_t offset;
    if ( argc != 2 )
    fprintf( stderr, "usage: %s filename
    ", argv[0] );
    return -1;
    // open the file
    fd = open( argv[1], O_RDONLY, 0 );
    if ( fd == 0 )
    fprintf( stderr, "%s: failed to open %s for read
    ", argv[0], argv[1] );
    return -1;
    sum = 0;
    offset = 0;
    loops = 9; // loop through the file 10 times
    gettimeofday( &lastTime, NULL );
    while ( 1 ) // loop for ever, loop exit is handled below
    // map in a kBufferSize segment of the file
    buffer = mmap( 0, kBufferSize, PROT_READ, MAP_FILE, fd, offset );
    if ( buffer == MAP_FAILED )
    fprintf( stderr, "%s: failed to mmap file at offset 0x%llx
    ", argv[0], offset );
    break;
    // touch every byte in this segment of the file.
    // this 'warms up' the pages in memory so that subsequent accesses will be much faster
    for ( cnt = 0; cnt < kBufferSize / sizeof(sum); cnt += 16 )
    sum += buffer[cnt + 0];
    sum += buffer[cnt + 1];
    sum += buffer[cnt + 2];
    sum += buffer[cnt + 3];
    sum += buffer[cnt + 4];
    sum += buffer[cnt + 5];
    sum += buffer[cnt + 6];
    sum += buffer[cnt + 7];
    sum += buffer[cnt + 8];
    sum += buffer[cnt + 9];
    sum += buffer[cnt + 10];
    sum += buffer[cnt + 11];
    sum += buffer[cnt + 12];
    sum += buffer[cnt + 13];
    sum += buffer[cnt + 14];
    sum += buffer[cnt + 15];
    // unmap the current segment of the file
    munmap( buffer, kBufferSize );
    // increment the offset into the file
    offset += kBufferSize;
    if ( offset >= kFileSize )
    offset = 0; // reset the offset if we're at the end of the file
    gettimeofday( &thisTime, NULL );
    printf( "Time = %u seconds, sum = %llx
    ", thisTime.tv_sec - lastTime.tv_sec, sum );
    if ( loops-- == 0 ) break; // exit if we've done all loops.
    lastTime = thisTime;
    close( fd ); // all done, close the file
    return 0;

    The short comment explains it:
    // touch every byte in this segment of the file.
    // this 'warms up' the pages in memory so that subsequent accesses will be much faster
    This is basically just buffered I/O. If you know you are going to need to read 10000 bytes, there is no need to read each byte one at a time. You read all 10000 bytes at once, then access each byte in memory instead of going to disk for it.

  • Partial Update error / sample code

    Customer is trying to do Partial Update by refering the sample shown in PartialUpdatesGuide.pdf, however, baseline update is showing following error. Is there any sample code to do partial update with the actual success in some instance, or any resolution for this ?
    WARNING:provisioning warning: The option '--updatedir' is reserved. It has been removed from the command line
    Additional informations are:
    - after partial update, dgraph_input/updates does not have partial update file (directory is empty). It seems that they does not use Parial Update Pipeline in forge, this file is not created.
    - Dgidx log does not show any other error or warning

    The message you see is just a warning that indicates the Dgraph node in your AppConfig XML (either DgraphCluster.xml or AuthoringDgraphCluster.xml) is not specified properly. My guess is that yours looks like this:
    <dgraph id="DgraphA1" host-id="LiveMDEXHostA" port="25000"
    post-startup-script="LiveDgraphPostStartup">
    <properties>
    <property name="restartGroup" value="1" />
    <property name="DgraphContentGroup" value="Live" />
    </properties>
    *     <args>*
    *          <arg>--updatedir</arg>*
    *          <arg>./data/dgraphs/DgraphA1/dgraph_input/updates</arg>*
    *     </args>*
    <log-dir>./logs/dgraphs/DgraphA1</log-dir>
    <input-dir>./data/dgraphs/DgraphA1/dgraph_input</input-dir>
    +<update-dir>./data/dgraphs/DgraphA1/dgraph_input/updates</update-dir>+
    </dgraph>
    The error message is complaining about the args section. The updatedir argument gets sourced from the update-dir element and if you try to specify it in args, you see the message below.
    I think we'll need more information to solve the primary issue (what does your PartialForge.log say, is there anything in data\partials\forge_output). Dgidx does not run during a partial update so not having a warning or error there is expected.
    Regards,
    Patrick Rafferty
    http://branchbird.com

  • Hotel AQ sample code error

    Have downloaded the Hotel reservation AQ sample code from OTN with 9.0.1.3 database, OC4J 903 and JDK 1.3. Everything deploys correctly, and when I open the AQEJBHOTELSAMPLE frameset page, I can see the hotel lists. However, when I try to click on either theb 'Hotel Details' or 'Room Availability' tabs, I get the following error in the OC4J journal (ORA-25228). According to the RequestAQHandler and ServiceAQHandler classes, the 'first_message' dequeue option is correctly set (this was a previous noted error in this area). Could someone please tell me what they think could be the problem here ? :-
    D:\OC4J-13\j2ee\home>java -jar D:\OC4J-13\j2ee\home\oc4j.jar -config D:\OC4J-13\j2ee\home\co
    nfig\server.xml -verbosity 10
    Application default (default) initialized...
    Binding EJB EJB Reservation System - The oracle.otnsamples.AQEJBHotelSample.ejb.Hotel sessio
    n bean to Hotel...
    Binding EJB EJB Reservation System - The oracle.otnsamples.AQEJBHotelSample.ejb.HotelSystem
    session bean to HotelSystem...
    Application AQEJBHotelSample (Hotel Reservation System - AQEJB Sample) initialized...
    Web-App default:defaultWebApp (0.0.0.0/0.0.0.0:8888) started...
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    Web-App AQEJBHotelSample:AQEJBHote[i]Long postings are being truncated to ~1 kB at this time.

    Have downloaded the Hotel reservation AQ sample code from OTN with 9.0.1.3 database, OC4J 903 and JDK 1.3. Everything deploys correctly, and when I open the AQEJBHOTELSAMPLE frameset page, I can see the hotel lists. However, when I try to click on either theb 'Hotel Details' or 'Room Availability' tabs, I get the following error in the OC4J journal (ORA-25228). According to the RequestAQHandler and ServiceAQHandler classes, the 'first_message' dequeue option is correctly set (this was a previous noted error in this area). Could someone please tell me what they think could be the problem here ? :-
    D:\OC4J-13\j2ee\home>java -jar D:\OC4J-13\j2ee\home\oc4j.jar -config D:\OC4J-13\j2ee\home\co
    nfig\server.xml -verbosity 10
    Application default (default) initialized...
    Binding EJB EJB Reservation System - The oracle.otnsamples.AQEJBHotelSample.ejb.Hotel sessio
    n bean to Hotel...
    Binding EJB EJB Reservation System - The oracle.otnsamples.AQEJBHotelSample.ejb.HotelSystem
    session bean to HotelSystem...
    Application AQEJBHotelSample (Hotel Reservation System - AQEJB Sample) initialized...
    Web-App default:defaultWebApp (0.0.0.0/0.0.0.0:8888) started...
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
    Web-App AQEJBHotelSample:AQEJBHote[i]Long postings are being truncated to ~1 kB at this time.

  • How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F

    hello there !!!!
    i m in Great Trouble please help me out..
    i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim Count As Int32
                If FormUID.Equals("Allowance") Then
                    If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                        If pVal.Row = 0 Then
                            'BubbleEvent = False
                        End If
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        Count = o_Matrix.RowCount()
                        SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
                        Validate(pVal, EventEnum, FormUID, BubbleEvent)
                    End If
                End If
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
        Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim Row, ii As Integer
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            o_Matrix.FlushToDataSource()
            Try
                For Row = 2 To o_Matrix.RowCount
                    StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
                    StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
                    StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
                    StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
                    If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
                        If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                        For ii = Row To DBtable.Rows.Count - 1
                            If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
                                SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                BubbleEvent = False
                                Exit Sub
                            End If
                        Next
                        If CDbl(StrName) < 0 Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                    End If
                Next Row
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

    Hello there
    sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
    Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
    i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
    here is my Sample Code...n i have to update in the validate portion...
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim oCellValue As SAPbouiCOM.EditText
                If FormUID.Equals("Allowance") Then
                    If (pVal.ItemUID = "MatAllow") Then
                        If pVal.Row = 0 Then Exit Sub
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
                        oForm = SBO_Application1.Forms.Item(FormUID)
                        If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                            If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
                                If pVal.Row = 0 Then Exit Sub
                                oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
                                If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
                                    SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
                                    oCellValue.Active = True
                                    BubbleEvent = False
                                    Exit Sub
                                End If
                            End If
                        End If
                    End If
                End If
                Validate(pVal, EventEnum, FormUID, BubbleEvent)
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
    Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim str, str1 As String
            Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
            Dim o_Matrix As SAPbouiCOM.Matrix
            Dim Sum As Integer
            Dim oRecordset As SAPbobsCOM.Recordset
            Dim Container As Integer
            Dim Count As Int32
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Try
                For Count = 0 To DBtable.Rows.Count - 1
                    CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
                    NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
                    Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
                    Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
                    Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
                    checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
                    Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
                    If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
                        Dim Sql As String
                        Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
                        oRecordset.DoQuery(Sql)
                    End If
                Next Count
                SBO_Application1.MessageBox("Record was Updated")
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

  • How to create a database for sample code from Tutorial/Book?

    I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
    I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
    I'm feeling overwhelmed with these links describing how to create a database:
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    (1) What is the command to list the existing databases?
    (2) What is the command to delete an existing database?
    (3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
    Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
    (4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
    (5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
    (6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
    Thanks
    Siegfried
    Edited by: user8816970 on Sep 26, 2012 12:01 PM
    Edited by: user8816970 on Sep 26, 2012 12:18 PM

    user8816970 wrote:
    Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
    Thanks!
    Siegfried
    >Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    above does NOT use SQL*Net to connect to the instance
    >
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
    >
    Thanks!
    Siegfrieda database in SQL Server is same as schema/user in Oracle

Maybe you are looking for

  • Developing the Wrapper class to log the message in XI server

    Hi All, We are trying to develop  wrapper class on the SAP Logging API, in that I am unable to log the message in the log file(whose path is mentioned in the properties file). We use this for storing when exception raised during message transformatio

  • MS SQL server 2008 - Bulk copy from XML to DB table throws bcp_init error

    I have MS SQL server 2008 installed , Windows version - Windows 7 Professional with SP1 Doing a bulk copy process using the SQL library function bcp_init function in c++ throws xml error and its not inserting the data into the tables. Error received

  • Is it possible to add own JSP tags to the palette?

    Is it possible to add own JSP tags to the palette? Currently we are using other JSP tag library like Coldbeans, Display Tag Lib, and JSF tags like ourFaces, etc. And we have few own JSF tags and it would be good to keep them in JSC.

  • Cognos 7 to OBIEE 11 migration

    Hi, I need to migrate Cognos Impromptu 7.3 catalog to OBIEE 11. Could you let me know what is the process of migration? Thanks and Regards, Pnreddy

  • Problems..getting nullvalues

    Hello! I have 3 jsp-pages with one form in each page to get from page1 to page2 you have to fill all fields in the form else you get an alertwindow (Javascript). All information is saved in a Bean which writes to an xml-file(this is done when you sub