Select statement for JDBC receiver synch scenario for capturing random value from ECC portal

Dear Experts,
I am working on ECC <----> SAP-PO 7.31 <----> JDBC synchronous scenario. I am clear about the config part except the Select statement. I will be
capturing 2 random values from the portal i.e. VendId and VendName in ECC to get the vendor details like Vendor Country, Vendor Status, Vendor Contact , Vendor Address etc from JDBC vendor table/view VENDETAIL.
What would be the select statement to capture the random values for ECC portal? My select statement would look some thing like this..
Select f1,f2,f3,f4 from table VENDETAIL where key1 = "VendId" and "VendName"
Please suggest if the above select statement works for the above scenario...
Regards
Rebecca

Hi Rebecca,
Your statement should work fine.
Please see the statement we use below.
SELECT eT_cashier, eT_proc_yn, eT_proc_date FROM eTest WHERE eb_proc_yn = 'N'
Just remember to update the change indicator so that you dont duplicate your records.
UPDATE eTest SET eb_proc_yn = 'Y' WHERE eb_proc_yn = 'N'.
Regards,
Jannus Botha

Similar Messages

  • Handling Fault Messages for JDBC Receiver (Syn Inbound)

    Dear Freinds,
    Can we handle fault messages for JDBC Receiver which is synchronous.
    OB Proxy Syn  <>  IB JDBC Syn
    1. How to handle the same ? Please give some examples.
    2. Should we use Stored Procedures at Oracle side to handle the fault messages and send back as response to the Proxy Response. Will it work.
    Thanks & Regards
    K.Ramesh

    Dear Friend,
    I have 2 interfaces where Proxy is OB & JDBC is IB. In the first interface both sender and Receiver are synchronous and in the second one it is Async.
    In the first interface i have to send one field from R/3 table along with Native SQL query string to XI and the response of the SELECT query is sent back to the sender.
    Assume if no fields are selected based on the field sent then proper error message has to be sent instead of the response message.
    In the second interface i will be using UPDATE query at Asyn JDBC receiver.
    How to do this if you are having JDBC Receiver.
    I saw in many blogs where they had mentioned that we cannot handle fault messages in the Receiver JDBC.
    KIindly explain.
    Thanks
    K.Ramesh

  • DYnamic select statement in JDBC adapter?

    Hi guys,
                 Is it possible so send dynamic select statement in jdbc adapter?
    XIer

    Aamir,
    The poster did not specify whether this was sender or receiver channel, but it would only make sense that a "dynamic query" must be on the receiver communication channel since if it was on the sender channel, the channel would have to intelligently determine how to do dynamic queries.
    Also, the poster asked if there was a way to "send a dynamic query" to the channel.  This seems to imply that the channel is receiving information from somewhere to determine the query, which could only mean it is a receiver channel.
    If you would like more information on the JDBC sender communication channel, please open a new thread.

  • Selecting random values from an array based on a condition

    Hi All,
    I have a small glitch here. hope you guys can help me out.
    I have an evenly spaced integer array as X[ ] = {1,2,3, ....150}. and I need to create a new array which selects 5 random values from X [ ] , but with a condition that these random values should have a difference of atleast 25 between them.
    for example res [ ] = {2,60,37,110,130}
    res [ ] = {10,40,109,132,75}
    I have been thinking of looping thru the X [ ], and selecting randomly but things look tricky once I sit down to write an algorithm to do it.
    Can anyone think of an approach to do this, any help will be greatly appreciated ...

    For your interest, here is my attempt.
    import java.util.Random;
    public class TestDemo {
        public static void main(String[] args) throws Exception {
            for (int n = 0; n < 10; n++) {
                System.out.println(toString(getValues(5, 25, 150)));
        private final static Random RAND = new Random();
        public static int[] getValues(int num, int spread, int max) {
            if (num * spread >= max) {
                throw new IllegalArgumentException("Cannot produce " + num + " spread " + spread + " less than or equals to " + max);
            int[] nums = new int[num];
            int max2 = max - (num - 1) * spread - 1;
            // generate random offsets totally less than max2
            for (int j = 0; j < num; j++) {
                int next = RAND.nextInt(max2);
                // favour smaller numbers.
                if (max2 > spread/2)
                    next = RAND.nextInt(next+1);
                nums[j] = next;
                max2 -= next;
            // shuffle the offsets.
            for (int j = num; j > 1; j--) {
                swap(nums, j - 1, RAND.nextInt(j));
            // add the spread of 25 each.
            for (int j = 1; j < num; j++) {
                nums[j] += nums[j-1] + spread;
            return nums;
        private static void swap(int[] arr, int i, int j) {
            int tmp = arr;
    arr[i] = arr[j];
    arr[j] = tmp;
    public static String toString(int[] nums) {
    StringBuffer sb = new StringBuffer(nums.length * 4);
    sb.append("[ ");
    for (int j = 0; j < nums.length; j++) {
    if (j > 0) {
    sb.append(", ");
    sb.append(nums[j]);
    sb.append(" ]");
    return sb.toString();

  • How to modify oracle stored procedure for JDBC Receiver Adapter?

    Hi all.
    This is Urgent.
    Scenario is
      SELECT a TABLE with procedure and update column with it,
      then send data to SAP System with RFC Adapter.
    When I executed a sync bpm, scenario was finished internal error.
    Pls, let me know how to correct procedure using JDBC Receiver Adapter?
    Regrds all.
    Procedure Code -
    SET SERVEROUTPUT ON
    CREATE OR REPLACE PROCEDURE zwtn2
    IS
       v_seller_company      wtnivhd.seller_company%TYPE;
       v_invoice_no      wtnivhd.invoice_no%TYPE;
       v_report_date     wtnivhd.report_date%TYPE;
       v_customs_date     wtnivhd.customs_date%TYPE;
       v_ap_post_date     wtnivhd.ap_post_date%TYPE;
       v_gr_date          wtnivhd.gr_date%TYPE;
    CURSOR l_cursor IS
       SELECT seller_company,
              invoice_no,
              report_date,
              customs_date,
              ap_post_date,
              gr_date
         FROM wtnivhd
        WHERE wtn_send_flag = 'N'
          AND rownum < 31
    FOR UPDATE;
    BEGIN
       OPEN l_cursor;
       LOOP
         FETCH l_cursor
          INTO v_seller_company,
               v_invoice_no,
               v_report_date,
               v_customs_date,
               v_ap_post_date,
               v_gr_date;
         EXIT WHEN l_cursor%NOTFOUND;
         UPDATE wtnivhd
            SET wtn_send_flag = 'Y' 
           WHERE CURRENT OF l_cursor;
       END LOOP;
    CLOSE l_cursor;
    END zwtn2;

    Hi Alex,
    plz have a look to Runtime Workbench / Adapter Monitoring to find an error message.
    Regards,
    Udo

  • Multi Mapping for JDBC Receiver JDBC Adapter

    Hi All,
        I'm trying an IDoc to JDBC (canonical XML) scenario using multi mapping (single IDoc as source and two different JDBC messages in receiver end). But, this is failing in RWB with some parser error. So, am not sure whether multi mapping is allowed for JDBC Canonical XML format. Please clarify.
    Thanks,
    Hussain.

    Hi ,
    JDBC Adapter supports multi mapping,so you can implement the same,but what do you mean by Canonical XML format??
    Regards,
    Raj

  • Database error for JDBC to Proxy Scenario

    Hello SAP PI Gurus, 
    I am having a JDBC to Proxy Scenario .And the interface is running at 10 min of duration. 
    However, my other interface are running fine with the same details.
    But for this interface, it giving the belwo error :
    Database-level error reported by JDBC driver
    while executing statement 'call proc_dtdc_prod_summary'.
    The JDBC driver returned the following error message: '
    com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table
    'dtdc_prod_summary_temp' already exists'. For details,
    contact your database server vendor.
    So increased the time from 10 min to 20 min to 30 min. But the erro remians.
    So pls look into this and give your suggestion.
    Regards,
    Ravi

    Hi Ravi,
    Please check execution of your stored procedure is resulting with creation of Table : dtdc_prod_summary_temp.
    Modify your stored procedure to just fetch records or insert records in the existing table. Or change the code to Create a table 'dtdc_prod_summary_temp only if it doesn't exits in the Table data base.
    Regards
    Praveen K

  • Function in select statement need to be called only for the last record.

    Select state,
    local,
    fun_state_loc_other_details(19) details
    from state_local
    where pm_key=19
    resuts:_
    State Local Details
    AP APlocal details1
    UP UPLocal details1
    MP MPLocal details1
    i) The above query returns 100 records
    ii) fun_state_loc_other_details is also getting called 100 times. But I want this function to be called only for the last record that is 100th record.
    is there any way to do that?

    Thanks amatu.
    One more small query. Can I do it on condition based.
    Select state,
    local,
    fun_state_loc_other_details(19) details
    from state_local
    where pm_key=19
    Like if one state it need to be called once.
    AP -- 50 records
    UP - 20 records
    MP -- 10 records.
    fyi: this record no. varies
    I want the function to be called for AP once, UP once, MP once.

  • Alerts for JDBC Receiver Adapter

    Hi ,
    I am using JDBC receiver adapter. I have configured the alert category and Alert rules. Alerts are getting for Mapping etc.
    When ever error occured in the SQL server whether its firewall issue or some other issue. The alerts are not created. Instead I can see the error message in RWB Message monitoring and communicaton channel monitoring.
    Please let me know How can raise alerts if the error occured at the JDBC receiver side.
    Thanks in advance,
    Kevin

    Hi Kevin,
    Probabaly the alert rule did not capture the error in the adapter engine.
    The filter for sender and receiver interface details in the alert rule can cause this issue depending on when and how the error occured. Can you create an alert rule with * for all entries, for adapter engine and check?
    Also do NOT check the option "suppress multiple alerts from this rule" because it will prevent subsequent alerts from this rule, if there is already one and not yet confirmed.
    Further please check the alerts in SALRT table in se16 if its created properly or via transaction ALRTDISP.
    Please use the report SXMSALERT_LOGREADER for troubleshooting and checking the alert logs.
    Hope this helps.
    Regards,
    Francis

  • Select statement is taking lot of time for the first time Execution.?

    Hi Experts,
    I am facing the following issue. I am using one select statement to retrieve all the contracts from the table CACS_CTRTBU according to FOR ALL ENTRIES restriction.
    if p_lt_zcacs[] is not initial.
    SELECT
               appl ctrtbu_id version gpart
               busi_begin busi_end tech_begin tech_end
               flg_cancel_obj flg_cancel_vers int_title
             FROM cacs_ctrtbu INTO TABLE lt_cacs FOR ALL ENTRIES IN p_lt_zcacs
                                                    WHERE
                                                    appl EQ gv_appl
                                                    AND ctrtbu_id EQ p_lt_zcacs-ctrtbu_id
                                                    AND  ( flg_cancel_vers EQ '' OR version EQ '000000' )
                                                    AND flg_cancel_obj EQ ''
                                                    AND busi_begin LE p_busbegin
                                                    AND busi_end GT p_busbegin.
    endif.
    The WHERE condition is in order with the available Index. The index has  APPL,CTRTBU_ID,FLG_CANCEL_VERS and FLG_CANCEL_OBJ.
    The technical settings of table CACS_CTRTBU says that the "Buffering is not allowed"
    Now the problem is , for the first time execution of this select statement, with 1.5 lakh entries in P_LT_ZCACS table, the select statement takes 3 minutes.
    If I execute this select statement again, in another run with Exactly the same parameter values and number of entries in P_LT_ZCACS ( i.e 1.5 lakh entries), it gets executed in 3-4 seconds.
    What can be the issue in this case? Why first execution takes longer time?.. Or is there any way to modify the Select statemnt to get better performance.
    Thanks in advance
    Sreejith A P

    Hi,
    >
    sree jith wrote:
    > What can be the issue in this case? Why first execution takes longer time?..
    > Sreejith A P
    Sounds like caching or buffering in some layer down the i/o stack. Your first execution
    seems to do the "physical I/O" where your following executions can use the caches / buffers
    that are filled by your first exectution.
    >
    sree jith wrote:
    > Or is there any way to modify the Select statemnt to get better performance.
    > Sreejith A P
    If modifying your SELECTS statement or your indexes could help depends on your access details:
    does your internal table P_LT_ZCACS  contain duplicates?
    how do your indexes look like?
    how does your execution plan look like?
    what are your execution figures in ST05 - Statement Summary?
    (nr. of executions, records in total, total time, time per execuiton,  records per execution, time per record,...)
    Kind regards,
    Hermann

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

  • Help!  Crashing JVM while doing SELECT statement through JDBC-ODBC bridge

    Hi everyone,
    Help please. I am working on a project on my own computer using the jdk version 1.5.0_04.
    The project involves running a select on a Microsoft Access 2003 database via the JDBC-ODBC bridge. The database is registered in the ODBC database sources, and it works fine in those other projects.
    Yet, when I'm running similar code in this project, it crashes the Java Virtual Machine. I get the following in a log file:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2308, tid=1364
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
    # Problematic frame:
    # C [ntdll.dll+0x1010]
    --------------- T H R E A D ---------------
    Current thread (0x000360f8): JavaThread "main" [_thread_in_native, id=1364]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
    Registers:
    EAX=0x00000004, EBX=0x26bb5250, ECX=0x7ffde000, EDX=0x00000004
    ESP=0x0007f8d8, EBP=0x0007f8f0, ESI=0x00000000, EDI=0x02ea1590
    EIP=0x7c901010, EFLAGS=0x00010246
    Top of Stack: (sp=0x0007f8d8)
    0x0007f8d8: 74355a16 00000004 02ea15b4 7432139f
    0x0007f8e8: 02ea15b4 02ea1590 0007f900 74322c5d
    0x0007f8f8: 02ea15b4 000361b4 0007f914 74325fa0
    0x0007f908: 02ea1590 74350000 00390000 0007f930
    0x0007f918: 7432740e 02ea1590 0007f950 00000003
    0x0007f928: 00aabe20 000361b4 0007f948 6d3e11da
    0x0007f938: 02ea1590 0007f950 000360f8 26bb5250
    0x0007f948: 0007f980 00ad826f 00000000 0007f99c
    Instructions: (pc=0x7c901010)
    0x7c901000: 90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
    0x7c901010: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
    Stack: [0x00040000,0x00080000), sp=0x0007f8d8, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ntdll.dll+0x1010]
    C [ODBC32.dll+0x2c5d]
    C [ODBC32.dll+0x5fa0]
    C [ODBC32.dll+0x740e]
    C [JdbcOdbc.dll+0x11da]
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    V [jvm.dll+0x82696]
    V [jvm.dll+0xd6fd9]
    V [jvm.dll+0x82567]
    V [jvm.dll+0x895e6]
    C [java.exe+0x14c0]
    C [java.exe+0x64cd]
    C [kernel32.dll+0x16d4f]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00a6e550 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2240]
    0x00a6d258 JavaThread "CompilerThread0" daemon [_thread_blocked, id=736]
    0x00a6c440 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2252]
    0x00a47808 JavaThread "Finalizer" daemon [_thread_blocked, id=3352]
    0x00a46328 JavaThread "Reference Handler" daemon [_thread_blocked, id=1560]
    =>0x000360f8 JavaThread "main" [_thread_in_native, id=1364]
    Other Threads:
    0x00a67a68 VMThread [id=2700]
    0x00a6f8c8 WatcherThread [id=2480]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 404K [0x22b90000, 0x22c30000, 0x23070000)
    eden space 512K, 70% used [0x22b90000, 0x22bea738, 0x22c10000)
    from space 64K, 66% used [0x22c20000, 0x22c2a990, 0x22c30000)
    to space 64K, 0% used [0x22c10000, 0x22c10000, 0x22c20000)
    tenured generation total 1408K, used 846K [0x23070000, 0x231d0000, 0x26b90000)
    the space 1408K, 60% used [0x23070000, 0x231438e0, 0x23143a00, 0x231d0000)
    compacting perm gen total 8192K, used 507K [0x26b90000, 0x27390000, 0x2ab90000)
    the space 8192K, 6% used [0x26b90000, 0x26c0ed38, 0x26c0ee00, 0x27390000)
    ro space 8192K, 66% used [0x2ab90000, 0x2b0e9dc0, 0x2b0e9e00, 0x2b390000)
    rw space 12288K, 46% used [0x2b390000, 0x2b927e98, 0x2b928000, 0x2bf90000)
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\jdk1.5.0_04\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6b0000 - 0x6d839000      C:\jdk1.5.0_04\jre\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
    0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\jdk1.5.0_04\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d680000 - 0x6d68c000      C:\jdk1.5.0_04\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\jdk1.5.0_04\jre\bin\java.dll
    0x6d6a0000 - 0x6d6af000      C:\jdk1.5.0_04\jre\bin\zip.dll
    0x6d3e0000 - 0x6d3ed000      C:\jdk1.5.0_04\jre\bin\JdbcOdbc.dll
    0x74320000 - 0x7435d000      C:\WINDOWS\system32\ODBC32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\COMCTL32.dll
    0x7c9c0000 - 0x7d1d5000      C:\WINDOWS\system32\SHELL32.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x763b0000 - 0x763f9000      C:\WINDOWS\system32\comdlg32.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x20000000 - 0x20017000      C:\WINDOWS\system32\odbcint.dll
    0x774e0000 - 0x7761d000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771ac000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x76fd0000 - 0x7704f000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x0f9a0000 - 0x0f9ab000      C:\WINDOWS\system32\VBAJET32.DLL
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    VM Arguments:
    java_command: NewUSCHOLiveUpdate
    Environment Variables:
    JAVA_HOME=C:\jdk1.5.0_04
    CLASSPATH=C:\jdk1.5.0_04\bin\NewLiveUpdate;C:\jdk1.5.0_04\bin\NewLiveUpdate\StatisticalItems;C:\jdk1.5.0_04\bin\NewLiveUpdate\Exceptions;C:\jdk1.5.0_04\bin\NewLiveUpdate\Helper;
    PATH=C:\jdk1.5.0_04\bin;C:\JavaTools\ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;;c:\program files\devstudio\sharedide\bin\ide;c:\program files\devstudio\sharedide\bin;c:\program files\devstudio\vc\bin
    USERNAME=Kevin Yetman
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 1047020k(627436k free), swap 2518436k(2161900k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_04-b05) for windows-x86, built on Jun 3 2005 02:10:41 by "java_re" with MS VC++ 6.0
    The code that is causing the problem is in the class shown below. It is in the method getBoxScoreFromDB. When it attempts to run the first select statement, it causes the crash that I showed above.
    The connection is set up by the calling class. The calling class constructs a LUDatabaseWorker, sets the necessary parameters (dbURL, driver class, username and password), and calls the openDBConnection().
    // LUDatabaseWorker.java
    import StatisticalItems.*;
    import java.sql.*;
    import java.util.*;
    public class LUDatabaseWorker
       private StatisticalItems.BoxScore m_CurrentBoxScoreInDB;
       private Connection                m_Connection;
       private String                    m_dbURL;
       private String                    m_dbUsername;
       private String                    m_dbPassword;
       private String                    m_dbDriverClass;
       public LUDatabaseWorker()
       public StatisticalItems.BoxScore getCurrentBoxScoreInDB()
       {  return m_CurrentBoxScoreInDB;
       public void setDBURL(String dbURL)
       {  m_dbURL=new String(dbURL);
       public void setDBUsername(String dbUsername)
       {  m_dbUsername=new String(dbUsername);
       public void setDBPassword(String dbPassword)
       {  m_dbPassword=new String(dbPassword);
       public void setDBDriverClass(String dbDriverClass)
       {  m_dbDriverClass=new String(dbDriverClass);
       public void openDBConnection()
          throws SQLException, ClassNotFoundException
          Class.forName(m_dbDriverClass);
          m_Connection=DriverManager.getConnection(m_dbURL, m_dbUsername, m_dbPassword);
       public void closeDBConnection()
          throws SQLException
          m_Connection.close();
       public Hashtable<String, Integer> getUSCHOCodeToMyTeamIndexMap()
          throws SQLException
          Hashtable<String, Integer> ht=new Hashtable<String, Integer>();
          String sqlQuery="SELECT TeamIndex, TeamCode FROM TeamLiveUpdateUSCHO";
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          while(rs.next())
             String uschoCode=new String(rs.getString(2));
             Integer myTeamIndex=new Integer(rs.getInt(1));
             ht.put(uschoCode, myTeamIndex);
          rs.close();
          st.close();
          return ht;
       public StatisticalItems.BoxScore getBoxScoreFromDB(StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          StatisticalItems.BoxScore  boxScoreFromDB=new StatisticalItems.BoxScore();
          // get the basic game info from the live update box score.
          StatisticalItems.Game    luBasicGameData=luBoxScore.getBasicGameData();
          // get the basic game data.
          String sqlQuery="SELECT * FROM Game WHERE (Year=" + luBasicGameData.getYear() + ") AND (Month='";
          if( luBasicGameData.getMonth() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getMonth() + "') AND (Day='";
          if( luBasicGameData.getDay() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getDay() + "') AND (HomeTeamIndex=" + luBasicGameData.getHomeTeamIndex();
          sqlQuery+=") AND (VisitorTeamIndex=" + luBasicGameData.getVisitorTeamIndex() + ")";
          System.out.println(sqlQuery);
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
             dbGame.setGameIndex(rs.getInt("GameIndex"));
             dbGame.setHomeTeamIndex(rs.getInt("HomeTeamIndex"));
             dbGame.setVisitorTeamIndex(rs.getInt("VisitorTeamIndex"));
             dbGame.setHomeTeamGoals(rs.getInt("HomeTeamGoals"));
             dbGame.setVisitorTeamGoals(rs.getInt("VisitorTeamGoals"));
             dbGame.setHomeTeamScoredFirst(rs.getString("HomeTeamScoredFirst"));
             dbGame.setYear(rs.getInt("Year"));
             dbGame.setMonth(rs.getInt("Month"));
             dbGame.setDay(rs.getInt("Day"));
             dbGame.setLeagueGame(rs.getBoolean("LeagueGame"));
             dbGame.setNeutralSiteGame(rs.getBoolean("NeutralSiteGame"));
             dbGame.setForfeitHome(rs.getBoolean("ForfeitHome"));
             dbGame.setForfeitVisitor(rs.getBoolean("ForfeitVisitor"));
             dbGame.setPlayoffGame(rs.getBoolean("PlayoffGame"));
             boxScoreFromDB.setBasicGameData(dbGame);
          StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
          // get the home team goals per period.
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbHomeGPP=boxScoreFromDB.getHomeTeamGoalsPerPeriod();
             dbHomeGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbHomeGPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbHomeGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbHomeGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbHomeGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbHomeGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbHomeGPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamGoalsPerPeriod(dbHomeGPP);
          // get the visitor team goals per period. 
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbVisitorGPP=boxScoreFromDB.getVisitorTeamGoalsPerPeriod();
             dbVisitorGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbVisitorGPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbVisitorGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbVisitorGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbVisitorGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbVisitorGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbVisitorGPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamGoalsPerPeriod(dbVisitorGPP);
          // get the home team shots per period.
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbHomeSPP=boxScoreFromDB.getHomeTeamShotsPerPeriod();
             dbHomeSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbHomeSPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbHomeSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbHomeSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbHomeSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbHomeSPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamShotsPerPeriod(dbHomeSPP);
          // get the visitor team shots per period. 
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbVisitorSPP=boxScoreFromDB.getVisitorTeamShotsPerPeriod();
             dbVisitorSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbVisitorSPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbVisitorSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbVisitorSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbVisitorSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbVisitorSPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamShotsPerPeriod(dbVisitorSPP);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbHomeST=boxScoreFromDB.getHomeTeamSpecialTeams();
             dbHomeST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbHomeST.setGameIndex(rs.getInt("GameIndex"));
             dbHomeST.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbHomeST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbHomeST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbHomeST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbHomeST.setPenalties(rs.getInt("Penalties"));
             dbHomeST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbHomeST.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamSpecialTeams(dbHomeST);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbVisitorST=boxScoreFromDB.getVisitorTeamSpecialTeams();
             dbVisitorST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbVisitorST.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorST.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbVisitorST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbVisitorST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbVisitorST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbVisitorST.setPenalties(rs.getInt("Penalties"));
             dbVisitorST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbVisitorST.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamSpecialTeams(dbVisitorST);
          rs.close();
          st.close();
          return boxScoreFromDB;    
       public void updateBoxScoreInDB(StatisticalItems.BoxScore  dbBoxScore,
                                      StatisticalItems.BoxScore  luBoxScore,
                                      LUBoxScoreComparator       bsc)
          throws SQLException
          if( bsc.getGameChanged() )
             updateGameInDB(dbBoxScore, luBoxScore);
          if( bsc.getHomeGoalsPerPeriodChanged() )
             updateHomeGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorGoalsPerPeriodChanged() )
             updateVisitorGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeShotsPerPeriodChanged() )
             updateHomeShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorShotsPerPeriodChanged() )
             updateVisitorShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeSpecialTeamsChanged() )
             updateHomeSpecialTeams(dbBoxScore, luBoxScore);
          if( bsc.getVisitorSpecialTeamsChanged() )
             updateVisitorSpecialTeams(dbBoxScore, luBoxScore);
       protected void updateGameInDB(StatisticalItems.BoxScore dbBoxScore,
                                     StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          // the only fields that NEED to be updated are HomeTeamGoals, VisitorTeamGoals, HomeTeamScoredFirst,
          // and LeagueGame.  You can't determine from the LU box Score:
          // Forfeits, NeutralSite, or Playoff.
          // the GameIndex, Both team indexes, and the game date will NEVER change from the database.
          Statement st=m_Connection.createStatement();
          String sqlStmt="UPDATE Game SET ";
          sqlStmt+="HomeTeamGoals=" + luBoxScore.getBasicGameData().getHomeTeamGoals() + ", ";
          sqlStmt+="VisitorTeamGoals=" + luBoxScore.getBasicGameData().getVisitorTeamGoals() + ", ";
          sqlStmt+="HomeTeamScoredFirst='" + luBoxScore.getBasicGameData().getHomeTeamScoredFirst() + "', ";
          sqlStmt+="LeagueGame=" + luBoxScore.getBasicGameData().getLeagueGame() + " ";
          sqlStmt+="WHERE GameIndex=" + dbBoxScore.getBasicGameData().getGameIndex();
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeSpecialTeams(StatisticalItems.BoxScore dbBoxScore,
                                             StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamSpecialTeams().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailSpecialTeams SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamSpecialTeams().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamSpecialTeams().getTeamIndex() + ", ";
             sqlStmt+="PowerplayGoals=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayGoals() + ", ";
             sqlStmt+="PowerplayOps=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayOps() + ", ";
             sqlStmt+="ShorthandedGoals=" + luBoxScore.getHomeTeamSpecialTeams().getShorthandedGoals() + ", ";
             sqlStmt+="ShorthandedOps=" + luBoxScore.getHomeTeamSpecialTeams().getShorthande                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    its because you use hungarian notation - that was the hollywood squares answer.
    It looks like a bug in either the ntdll or the JdbcOdbc dll, so I'd see if you can't isolate the problem (like using a smaller bit of code) and file a bug report. Find out exacty what your sql statement is which causes this to crash - hint : line 215

  • Parameters in select statement in JDBC Sender Adapter

    Hi,
    Is it possible to construct a SQL select statement with some parameters (for example: #currentdate )?
    (for sender JBDC adapter)
    Thank you

    hi,
    you can very well construct a select statement.
    The Source data type should be of this format:
    <resultset>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    </resultset>
    try this link:
      http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    regards,
    Priyanka

  • Executing Select query using JDBC Receiver Adapter

    I created couple types in Oracle and also new function instead of procedure
    Can I execute the above query using JDBC Receiver Adapter.
    select *
    from  the ( select cast( apr.get_distribut('', '', '', 'hdfcgd', 'CAN') as dsrTable )
             from dual );
    If possible how my message structure should look like...

    Hi vikram,
       If you use JDBC as Receiver Adapter you can only post the data to the data base I do no think so we can select the records from the data base.
       If you use JDBC as Sender hope,we can the select query in the sender communication channel.
        Hope I am clear.
      Thanks and Regardds,
      Chandu.

  • JDBC Receiver Adapter:Incorrect syntax near the keyword 'FROM'

    Hi All,
    I'm trying to get data from an SQL 2005 server using synchronous JDBC receiver adapter. I'm using PI 7.0. My outgoing message is as follows:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_IZIN_YUKU_REQ xmlns:ns0="http://holding.com/brd/">
    - <STATEMENT>
    - <ECZ_IZIN_YUKU action="SELECT">
      <table>ECZ_IZIN_YUKU</table>
      <access />
    - <key>
      <iy_yil compareOperation="GT">1900</iy_yil>
      </key>
      </ECZ_IZIN_YUKU>
      </STATEMENT>
      </ns0:MT_IZIN_YUKU_REQ>
    I've found the following log in the trace file:
    #1.5#0014C23BCFC900630000003D000013B000042740B0A858B1#1169058702046#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.XI2JDBC.onInternalMessageBinary(Message)#J2EE_GUEST#0####fa10f5f0a65811db84410014c23bcfc9#XI XI2JDBC[CC_JDBC_RECI_BRD_TO_BHT/HUMANIST/]_2574##0#0#Error#1#com.sap.aii.adapter.jdbc.XI2JDBC#Plain###Error processing request, rollback: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ECZ_IZIN_YUKU' (structure 'STATEMENT'): com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'FROM'.#
    Thanks a lot..

    Hi,
    Make sure the XML structure for your SQL statement is correct. Include the all the fields in the structure of XML.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_IZIN_YUKU_REQ xmlns:ns0="http://holding.com/brd/">
    <STATEMENT>
              <TECZ_IZIN_YUKU ACTION="SELECT">
                     <TABLE>ECZ_IZIN_YUKU</TABLE>
                              <ACCESS>
                                   <EMPNO></EMPNO>
                                   <NAME></NAME>
                               </ACCESS>
                                 <KEY>
                                       <iy_yil compareOperation="GT">1900</iy_yil>
                                 </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_IZIN_YUKU_REQ>
    Best Regards

Maybe you are looking for

  • Java.util.regex.Pattern.error(Pattern.java:1713)

    Hi, I have some users migrating from Toad to SQL Developer. The following script was correctly running with Toad and not with SQL Developer : DECLARE I_DEB DATE; I_FIN DATE; BEGIN I_DEB := to_date('01072010','ddmmyyyy'); I_FIN := to_date('17092010','

  • My iPOd 8G no longer connects to my home wifi?!

    It seems like this is a common problem. Apparently I should not have upgraded to OS4. I can not believe that my Touch is just another MP3 player... but it cost a lot more. I have reset my wifi key, reset my iPod, followed every suggestion. I am reall

  • Old LG Monitor with Mini?

    Hi guys For many years i've been planing to buy an apple computer, but they are too expansive here in brazil. So the Mac Mini (which costs around R$2800; that means US$1100) could be a option. The problem buying the mini is that i only have an old LG

  • Screen Protector for Ipod Touch

    Hi Guys Does anyone recommend a good screen protector for my ipod touch? Thanks

  • LabVIEW 8.5.1 project file cannot be opened by other users.

    In LabVIEW 8.5.1 I created a project file, but other users with admin rights can not open it.  How do I fix this?