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

Similar Messages

  • Limitations of Statement.addBatch() jdbc:odbc bridge to SQL Server 2K

    Hi all,
    I was attempting some performance tuning in my applications and I attempted to use the addBatch method in a statement during a loop and the corresponding executeBatch when the loop is complete. For some reason all my inserts were not sent to the database. So I did a test. I wrote some code that would allow me to create 'X' amount of sql statements and add them to batch and execute. Here's a sample of my code:
    void jButton7_actionPerformed(ActionEvent e)
    try
    if(connect == null)
    String url = "jdbc:odbc:someDataSourceName";
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    connect =
    DriverManager.getConnection( url, "****", "****");
    System.out.println("Connection supports batch updates T/F = " + connect.getMetaData().supportsBatchUpdates());
    int x = new Integer(fldNumOfLoops.getText()).intValue();
    java.sql.Statement stat = connect.createStatement();
    stat.addBatch("create table stutemp (somecolumn varchar(200)); ");
    for(int i = 0; i < x; i++)
    stat.addBatch("insert into stutemp (somecolumn) values('This is a test of inserting row Number " + i + "'); ");
    java.sql.Timestamp tsNow = new java.sql.Timestamp(new java.util.Date().getTime());
    stat.executeBatch();
    System.out.println("Batching " + x + " rows started " + tsNow + " ended " + new java.sql.Timestamp(new java.util.Date().getTime()));
    stat.close();
    stat = null;
    stat = connect.createStatement();
    java.sql.ResultSet rs = stat.executeQuery("select count(*) from stutemp");
    while(rs.next())
    System.out.println("Results returned from sb batching = " + rs.getString(1));
    stat.close();
    stat = null;
    stat = connect.createStatement();
    stat.execute("drop table stutemp");
    connect.close();
    connect = null;
    catch(Exception ex)
    ex.printStackTrace();
    For some reason, I'm only safe inserting 455 records along with the table create. sometimes it will allow me to insert 456, or 457, but never any more than that. And it fluctuates. Does anyone know why this is? Is there a size limit on adding statements to batch? For giggles, I created a String Buffer version where I'm adding statements to a stringbuffer and doing an execute on the statement. I'm getting the same results.
    Thanks,
    Stu

    Sorry, One more thing. If I put a Thread.Sleep(); after the execute batch I get more inserts depending on the amount of time I tell my thread to sleep.........
    What's up with this. Shouldn't this be a Sync process where the calling thread should wait until the statement executes????????????????

  • Using Variables in a select statement through a Database Adapter

    I was wondering how I reference a variable in a select statement through a Database Adapter.
    Ex.
    1. I have a global variable that stores an employee number
    2. I want to select an SSN # from a table based on an employee #
    variable.
    select ssn from emp where ssn = :input_variable - ????
    - how do i reference the variable - I am getting a 'missing IN or OUT parameter error?
    Any advice is much appreciated.
    ~Thanks

    I'm just wondering if anyone knows a work around so that I might be able to store a Table's FIELD name in a variable or an array[] so that I can do a query based on the decision of a loop without having to code 10 IF/ELSE statements.For instance, although the above code will not work, this code, although quite lengthy, does:
    If DataGrid1.SelStartCol = 0 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES__PUR_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 1 Then
    Adodc1.RecordSource = "Select * from tblReservation order by VENDOR"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 2 Then
    Adodc1.RecordSource = "Select * from tblReservation order by VEN_LOC"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 3 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_TYPE"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 4 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_FROM_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 5 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_TO_DT"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 6 Then
    Adodc1.RecordSource = "Select * from tblReservation order by MISC_ADJ"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 7 Then
    Adodc1.RecordSource = "Select * from tblReservation order by STATE_TAX"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 8 Then
    Adodc1.RecordSource = "Select * from tblReservation order by LOC_CHARGE"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 9 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_ID"
    Adodc1.Refresh
    ElseIf DataGrid1.SelStartCol = 10 Then
    Adodc1.RecordSource = "Select * from tblReservation order by RES_OP"
    Adodc1.Refresh
    End If
    Do you see where i'm going with this?
    I simple want to use a variable in the "select * from <Table> Order by <Field>"

  • Issue while doing material posting through Usage Decision

    Hi all,
    I have an issue while doing material posting through Usage Decision. Please find below the details.
    Inspection Lot  10000604689
    Material        1730PCPBS.0031
    Batch           QP611097      GQ02
    Out of total qty of 2100 we need to post the following
    To unrestricted use                     2,098
    To sample usage                         2
    Following error appears,
    Deficit of SL Stck.in qual.insp 1,638 NO : 1730PCPBS.0031 62GQ GQ02 QP611097
    Message no. M7021
    Diagnosis
    Shortfall below the specified stock level or quantity amounting to 1,638 NO.
    System Response
    If the message is an error message (E), the above is not allowed.
    If the message is a warning message (W), the system will allow your input, but the warning is intended to prevent you entering a wrong quantity.
    Procedure
    In the case of a warning message, check the quantity entered.
    In the case of an error message, change the quantity or terminate processing.
    I have checked that quantity 2100 of material 1730PCPBS.0031 is in QI stock. Kindly advice what is the issue and why we are getting the error?
    Regards,
    Brijesh

    Hi Brijesh,
    What is the status of inspection lot?
    One of the possibilities I think could be inconsistencies between MM and QM.
    Have a look on SAP note 48815- Checking possible inconsistencies between MM and QM.
    Regards,
    Anand Rao

  • Populate Tax Code in RKWA table while doing transfer posting through MIGO.

    Hi All,
    I have a requirement where for certain countries i have to pass the tax code to RKWA table while doing Transfer posting through MIGO transaction.
    For certain countries which i have to pass the Tax code to RKWA table, basically will not be having the tax code. For this reason im looking for BADi/User exits where i can update the RKWA table with the tax code. If the tax code is not derived, im getting the error as 'No tax information found'.
    Please suggest if any BADi/exits are available for this requirement.
    Regards,
    Santosh

    Check the following SAP notes:
    139176
    579241
    Regards,
    Indranil

  • Timesten create a lock for select statement through sqldev

    When use ttisql connect to TimesTen Release 7.0.6.15.0 at autocommit=1, there is no lock for select statement.
    but when I use sql developer (driver is ttjdbc5.jar, regardless of version) to connect, even with autocommit=1, there will be locks for select statement.
    Is it a bug? How can I achieve the same no locks for select statement through sql developer?Thanks.

    -your update tells me that you are connected to a remote timesten data store using the client driver
    -the ttXactAdmin output indicates that SqlNavigator has a shared lock on the database itself: this will not interfere with anybody else' read operations, and I believe that until such time as you actually attempt some kind of DML against the data store that th IX lock on the database lock will not interfere with any other DML either.
    -a shared database lock will always be acquired for any transaction in TimesTen. You can test this for yourself from ttisql: set autocommit off, perform a simple update and do not commit the transaction. Then open a separate session and execute ttxactadmin - you will the IX database lock as well as the various locks on tables and indexes.
    -I believe this pretty much proves my original thinking: that sqlDeveloper attaches to TimesTen in transaction mode. However, the IX lock on the database will not interfere with anybody else's work and should not be a problem.

  • 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.

  • Problem with locks while using iBATIS with MS Access through JDBC-ODBC brid

    Hello,
    I am attempting to use iBATIS to access MS Access file via JDBC-ODBC bridge.
    (I am using Spring's "SqlMapClientDaoSupport," but that is probably irrelevant)
    All this runs on Tomcat... First time DB gets accessed the LDB lock file is created. From there on the only way I can remove the lock file is to kill the JVM...
    Any help is greatly appreciated...

    And why is that a problem?

  • JDBC-ODBC Bridge seems to slow down after a while

    Hi,
    I've got a weird problem going on with an application I'm writing. I hope someone can tell me what I'm doing wrong.
    The problem I'm encountering is in he code shown below. The function getAllGamesForATeam is creating a list of items in an ArrayList and passing it back to an Event handler so that I can put it in the session of a servlet. The first time I run this code, it is fast. Fast enough to use on a servlet. The second time it runs, it is MUCH slower...too slow to use on a servlet. The third time it runs, it gets even worse.
    I am using the JDBC-ODBC bridge to access my database which is in Access 97. I do have connection pooling enabled on the database. Still it is slow.
    If you have any ideas, I would appreciate it. Here's the code:
    // GameBean.java
    // A class to represent a Game in my College Hockey Program
    // Based on Team and League tables.
    package MyBeans;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.http.*;
    * <p>This is the Java bean used to get and display information about
    * items for sale in our web based store.
    * @version 1.0.0 08/13/2001
    * @author Kevin Yetman
    * @see DBBeanBase
    public class GameBean extends DBBeanBase
    * <p>Default constructor, creates an empty {@link GameBean}.
    public GameBean()
    super();
    * <p>Copy constructor. This constructor creates a {@link GameBean} object
    * that is initially populated with a copy of the {@link java.util.Map} specified
    * as a parameter to this constructor. All {@link java.util.Map} Maps should
    * implement a copy constructor.
    * @param copyThisMap the {@link Map} used to initialize this {@link GameBean} object.
    public GameBean(Map copyThisMap)
    super(copyThisMap);
    * <p>This constructor creates an {@link GameBean} object and
    * populates it with the fields in a {@link java.sql.ResultSet}.
    * @param rs The {@link java.sql.ResultSet} object used to populate
    * this class with information about an item.
    * @throws java.sql.SQLException if there is an error iterating the
    * {@link java.sql.ResultSet}.
    protected GameBean(ResultSet rs) throws SQLException
    super(rs);
    * <p>This constructor creates an {@link GameBean} object associated with the
    * specified item id. If there is no record in the data source with the
    * specified item id, an exception is thrown.
    * @param conneciton The {@link java.sql.Connection} object used to execute
    * the select statement that will retrieve the item information.
    * @param iLeagueId specifies the league id used to populate this object.
    * @throws java.sql.SQLException if there is an error selecting the item
    * information.
    * @throws java.lang.Exception if the item id is invalid.
    public GameBean(Connection connection, int iGameId) throws SQLException, Exception
    super();
    String strSQL="SELECT GameIndex, Month, Day, Year, HomeTeamIndex, VisitorTeamIndex, HomeTeamScoredFirst, LeagueGame, NeutralSiteGame, PlayoffGame, HomeTeamGoals, VisitorTeamGoals FROM Game WHERE GameIndex=" + iGameId;
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(strSQL);
    if (rs.next())
    populateFromResultSet(rs);
    else
    throw new Exception("Invalid game Id: " + iGameId);
    putInTeamNames(connection);
    * <p>This method returns the league's index.
    * @return the league's index.
    public void putInTeamNames(Connection connection)
    throws SQLException
    String strSQL="SELECT TeamName FROM Team WHERE TeamIndex=" + getHomeTeamIndex();
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(strSQL);
    if( rs.next() )
    put("HOMETEAMNAME", rs.getString("TeamName"));
    strSQL="SELECT TeamName FROM Team WHERE TeamIndex=" + getVisitorTeamIndex();
    rs=statement.executeQuery(strSQL);
    if( rs.next() )
    put("VISITORTEAMNAME", rs.getString("TeamName"));
    * <p>This method returns the league's index.
    * @return the league's index.
    public String getGameIndex()
    return get("GAMEINDEX").toString();
    * <p>This method returns the name of the league.
    * @return the name of the league.
    public String getMonth()
    return get("MONTH").toString();
    * <p>This method returns the name of the league.
    * @return the name of the league.
    public String getDay()
    return get("DAY").toString();
    * <p>This method returns the name of the league.
    * @return the name of the league.
    public String getYear()
    return get("YEAR").toString();
    * <p>This method returns the name of the league.
    * @return the name of the league.
    public String getHomeTeamName()
    return get("HOMETEAMNAME").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getVisitorTeamName()
    return get("VISITORTEAMNAME").toString();
    * <p>This method returns the name of the league.
    * @return the name of the league.
    public String getHomeTeamIndex()
    return get("HOMETEAMINDEX").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getVisitorTeamIndex()
    return get("VISITORTEAMINDEX").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getLeagueGame()
    return get("LEAGUEGAME").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getNeutralSiteGame()
    return get("NEUTRALSITEGAME").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getPlayoffGame()
    return get("PLAYOFFGAME").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getHomeTeamScoredFirst()
    return get("HOMETEAMSCOREDFIRST").toString();
    * <p>This method returns the league's nickname.
    * @return the league's nickname.
    public String getHomeTeamGoals()
    return get("HOMETEAMGOALS").toString();
    * <p>This method returns the league's automatic bids.
    * @return the league's automatic bids.
    public String getVisitorTeamGoals()
    return get("VISITORTEAMGOALS").toString();
    * <p>This method returns a textual representation of this {@link ItemBean}.
    * @return a textual representation of this {@link ItemBean}.
    public String toString()
    StringBuffer sb=new StringBuffer();
    sb.append("GameIndex: " + getGameIndex() + "\n");
    sb.append("HomeTeamScoredFirst: " + getHomeTeamScoredFirst() + "\n");
    sb.append("PlayoffGame: " + getPlayoffGame() + "\n");
    sb.append("LeagueGame: " + getLeagueGame() + "\n");
    sb.append("NeutralSiteGame: " + getNeutralSiteGame() + "\n");
    sb.append("HomeTeamIndex: " + getHomeTeamIndex() + "\n");
    sb.append("VisitorTeamIndex: " + getVisitorTeamIndex() + "\n");
    sb.append("HomeTeamName: " + getHomeTeamName() + "\n");
    sb.append("VisitorTeamName: " + getVisitorTeamName() + "\n");
    sb.append("Month: " + getMonth() + "\n");
    sb.append("Day: " + getDay() + "\n");
    sb.append("Year: " + getYear() + "\n");
    return sb.toString();
    * <p>This method returns a {@link java.util.Collection} of all of the teams
    * in the data source.
    * @param connection The {@link java.sql.Connection} object used to execute
    * the select statement that will retrieve the teams.
    * @return a {@link java.util.Collection} of all of the teams in the data source.
    * @throws java.sql.SQLException if there is an error selecting the items.
    public static Collection getAllGames(Connection connection) throws SQLException
    Collection col=new ArrayList(1100);
    String strSQL = "SELECT GameIndex, Month, Day, Year, HomeTeamIndex, VisitorTeamIndex, HomeTeamScoredFirst, LeagueGame, NeutralSiteGame, PlayoffGame, HomeTeamGoals, VisitorTeamGoals FROM Game";
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(strSQL);
    while(rs.next())
    GameBean currentGame=new GameBean(rs);
    currentGame.putInTeamNames(connection);
    col.add(currentGame);
    return col;
    * <p>This method returns a {@link java.util.Collection} of all of the teams
    * in the data source.
    * @param connection The {@link java.sql.Connection} object used to execute
    * the select statement that will retrieve the teams.
    * @return a {@link java.util.Collection} of all of the teams in the data source.
    * @throws java.sql.SQLException if there is an error selecting the items.
    public static Collection getAllGamesForALeague(Connection connection, String leagueNickName) throws SQLException
    Collection col=new ArrayList(500);
    String strSQL = "SELECT LeagueIndex FROM League WHERE LeagueNickName='" + leagueNickName + "'";
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(strSQL);
    int leagueIndex=-1;
    if( rs.next() )
    leagueIndex=rs.getInt("LeagueIndex");
    strSQL = "SELECT GameIndex, Month, Day, Year, HomeTeamIndex, VisitorTeamIndex, HomeTeamScoredFirst, LeagueGame, NeutralSiteGame, PlayoffGame, HomeTeamGoals, VisitorTeamGoals FROM Game";
    strSQL+=" WHERE (HomeTeamIndex IN (SELECT TeamIndex FROM Team WHERE LeagueIndex=" + leagueIndex + ")) OR";
    strSQL+=" (VisitorTeamIndex IN (SELECT TeamIndex FROM Team WHERE LeagueIndex=" + leagueIndex + "))";
    strSQL+=" ORDER BY Year, Month, Day";
    statement = connection.createStatement();
    rs = statement.executeQuery(strSQL);
    while(rs.next())
    GameBean currentGame=new GameBean(rs);
    currentGame.putInTeamNames(connection);
    System.out.println(currentGame.getGameIndex());
    col.add(currentGame);
    return col;
    * <p>This method returns a {@link java.util.Collection} of all of the teams
    * in the data source.
    * @param connection The {@link java.sql.Connection} object used to execute
    * the select statement that will retrieve the teams.
    * @return a {@link java.util.Collection} of all of the teams in the data source.
    * @throws java.sql.SQLException if there is an error selecting the items.
    public static Collection getAllGamesForATeam(Connection connection, String teamName)
    throws SQLException
    Collection col=new ArrayList(50);
    String strSQL = "SELECT TeamIndex FROM Team WHERE TeamName='" + teamName + "'";
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery(strSQL);
    int teamIndex=-1;
    if( rs.next() )
    teamIndex=rs.getInt("TeamIndex");
    strSQL = "SELECT GameIndex, Month, Day, Year, HomeTeamIndex, VisitorTeamIndex, HomeTeamScoredFirst, LeagueGame, NeutralSiteGame, PlayoffGame, HomeTeamGoals, VisitorTeamGoals FROM Game";
    strSQL+=" WHERE (HomeTeamIndex=" + teamIndex + ") OR";
    strSQL+=" (VisitorTeamIndex=" + teamIndex + ")";
    strSQL+=" ORDER BY Year, Month, Day";
    statement = connection.createStatement();
    rs = statement.executeQuery(strSQL);
    while(rs.next())
    GameBean currentGame=new GameBean(rs);
    currentGame.putInTeamNames(connection);
    col.add(currentGame);
    return col;
    // The unit test method public static void main(String[] args)
    // has been moved to ..\TestPrograms\TestItemBean.java so that this
    // class can be used in the package MyBeans.
    /////////////////////////////////// END OF FILE //////////////////////////////

    Where do you close the ResultSet?
    Where do you close the Statement?
    Presumably you only create one connection for all users or you close it somewhere.

  • JDBC-ODBC Bridge does not support Unicode UTF-16

    Hi
    I'm using Jdeveloper 10.0.3 IDE in order to develop an application for data transformation between MS Access 2003 (source) and Oracle 10g (destination). Clients use Windows XP.
    JDBC-ODBC Bridge still does not support Unicode UTF-16 which is the Charest used by MS Access 2000/2003.
    Note that when I changed locale in regional setting, destination Connection to Ora10g failed to open a connection, it works only with English locale, so I can't change my locale information.
    How can I read Unicode from source DB?
    Any help would be appreciated. I look forward to see your response.
    Thanks,

    i also heared that JDBC-ODBC Bridge still does not support Unicode UTF-16,
    but i guess this is not in my case.That's the key in fact. JDBC-ODBC Bridge does not support UTF-16, which is the charset used by MS Access 2000/2003.
    or do i need to use a third party driver for jdbc odbc bridge?Free library at http://jackcess.sourceforge.net/
    Commerical JDBC driver at http://www.hxtt.com/access.html
    Yonghong Zhao
    System Analyst
    www.hxtt.com

  • Does XMLSQL Utility support JDBC-ODBC brideg?

    Dear Sir,
    I want to use your XMLSQL Utility to exchange data between XML
    and database( Access database ) through sun's jdbc-odbc bridge,
    but got the following run time error:
    oracle.xml.sql.OracleXMLSQLException:
    java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcStatement
    at
    oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:345
    at
    oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:248
    at samp10.main(samp10.java:42)
    I would like to know if this utility support the jdbc-odbc
    bridge?
    Chen Jian
    null

    The version that you have.. no. Not even going as far as
    jdbc-odbc bridge, the currently released version of the XSU
    requires, for the most part, the Oracle JDBC drivers. We plan to
    fix this in the comming relase. When release...? Very soon :)
    Chen Jian (guest) wrote:
    : Dear Sir,
    : I want to use your XMLSQL Utility to exchange data between XML
    : and database( Access database ) through sun's jdbc-odbc bridge,
    : but got the following run time error:
    : oracle.xml.sql.OracleXMLSQLException:
    : java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcStatement
    : at
    oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:345
    : at
    oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:248
    : at samp10.main(samp10.java:42)
    : I would like to know if this utility support the jdbc-odbc
    : bridge?
    : Chen Jian
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Table or view does not exists error while executing select statement

    Hi,
    I am new to Oracle. I am getting a error while executing the select statement if i give table name without double quotes.
    Ex: Select * from Customer;
    But working fine when the table name is enclosed within a double quotes.
    Ex: Select * from "Customer";
    Is there any way to execute the select statement without the double quotes?
    Actually I am using NHibernate objects for data access.
    Thanks,
    Sai

    Actually I am using NHibernate objects for data access.And probably that's the problem:
    SQL> select * from mytab;
             A
             1
    SQL> select * from mYtAb;
             A
             1
    SQL> select * from MYTAB;
             A
             1
    SQL>  select * from MYTAb;
             A
             1Oracle statements are case insensitive and doesn't require double quotes unless the object names are reserved words.
    As wrote by others if table is created using double quotes it's name bacomes case-sensitive... and this could be the problem...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/05/gestione-degli-errori-in-sql-con-log-errors/]
    Edited by: Massimo Ruocchio on Feb 5, 2010 7:08 PM
    Added last comment..

  • Error while doing Bank determination through FBZP

    Hi,
    I have copied Company code 0001 for creating my own. Some house bank data also got copied though its allowing me to define new House banks as per my requirement but while doing account determination I am getting the following error:
    "Clearing account only allowed for an outgoing bills of exchange payment" Message number F3029.
    This is becausse of some config that came with the copy and has "W" payment method and a clearing account is defined for it. I am not even using bills of exchange as a payment method for country IN though its defaulting for my company code and not allowing me to delete it.
    I can see the entry in table T042I, I tried deleting it from FBZP but the clearing acct column is greyed out and its not allowing me to delete it and because of this I am unable to do account determination for my house banks.
    SM30 is not available for T042I and I am not convinced about deleting it through debugger. I am checking SAP notes but havent found anything on this yet.
    Should I change this message from an "error" to a "warning"? How is this done?
    Please help me out in resolving this error asap.
    Thanks and regards,
    Rajat

    Hi,
    I have copied Company code 0001 for creating my own. Some house bank data also got copied though its allowing me to define new House banks as per my requirement but while doing account determination I am getting the following error:
    "Clearing account only allowed for an outgoing bills of exchange payment" Message number F3029.
    This is becausse of some config that came with the copy and has "W" payment method and a clearing account is defined for it. I am not even using bills of exchange as a payment method for country IN though its defaulting for my company code and not allowing me to delete it.
    I can see the entry in table T042I, I tried deleting it from FBZP but the clearing acct column is greyed out and its not allowing me to delete it and because of this I am unable to do account determination for my house banks.
    SM30 is not available for T042I and I am not convinced about deleting it through debugger. I am checking SAP notes but havent found anything on this yet.
    Should I change this message from an "error" to a "warning"? How is this done?
    Please help me out in resolving this error asap.
    Thanks and regards,
    Rajat

  • [u][b]Performance Tuning Help[/b][/u] : Repeating HUGE Select Statement...

    I have a select statement that I am repeating 12 times with the only difference between them all being the date range that is grabbed. Essentially, I am grabbing the last 12 months of information from the same table here is a copy of one of the sections:
    (select
    a.account_id as account_id,
    a.company_id as company_id,
    a.account_number as acct_number,
    to_char(a.trx_date, 'YYYY/MM') as month,
    sum(a.amount_due_original) as amount
    from
    crystal.financial_vw a
    where
    a.cust_since_dt is not null
    and a.cust_end_dt is null
    and a.trx_date > add_months(sysdate, -13)
    and a.trx_date <= add_months(sysdate, -12)
         group by
              a.account_id,
              a.company_id,
              a.account_number,
              to_char(a.trx_date, 'YYYY/MM')) b
    I am now looking to do some tuning on this and was wondering if anyone has any suggestions. My initial thought was to use cursors or some sort of in memory storage to temporarily process the information into a pipe-delimited flat file.

    "Don't need:
    to_char(a.trx_date, 'YYYY/MM')"
    Are you sure?
    "Change to (just to make it easier to read):
    a.trx_date between add_months(sysdate, -13)
    and a.trx_date <= add_months(sysdate, -12)"
    What? That's not even valid syntax is it? Besides the fact that the BETWEEN operator is inclusive (i.e. > add_months(sysdate, -13) is not the same as between add_months(sysdate, -13) ...).
    "And be sure you have an index on:
    cust_since_dt, cust_end_dt, trx_date in financial_vw."
    What information did you base this conclusion on. Just because something is in the where clause doesn't mean you should automatically throw an index on it. What if 90% of the rows satisfy those null/not null criteria? What if there's only one year of data in this table? Are you certain an index would help pick out all the data for one month more efficiently than a full table scan?
    My immediate question was why are you breaking the data for each month up into separate subqueries like this at all? What is it that your doing with these subqueries that you don't believe can be accomplished with a single grouped query?

  • Getting error while doing stream setup through OEM

    hi all,
    I am getting following error while doing stream setup for user stradmin (ORCL) db to stradmin_dest (orcldestination) on same windows m/c.
    java.sql.SQLException: ORA-20204: User does not exist: STRADMIN ORA-06512: at "SYSMAN.MGMT_USER", line 122 ORA-06512: at "SYSMAN.MGMT_JOBS", line 139 ORA-06512: at "SYSMAN.MGMT_JOBS", line 78 ORA-06512: at line 1
    I provided everything (host credential, usernames for new users and table capture)
    its urgent
    Help in advance

    hi,
    thanks for reply but DB user exists. It seems to be problem of WIN environment with Streams. I could solve it. But after whole setup and starting Apply and capture capture process goes for hours, not replicated at destination database. Normally how fast is replcation when done for small db like scott on table emp.
    thanks

Maybe you are looking for

  • X crashes on startup with AMD dual screen setup

    Ever since I bought my AMD Kaveri A10-7850K at the end of January last year I've been having trouble getting a dual screen setup to work properly. Initially I put this down to poor beta drivers, and as I had far too much going on to investigate the i

  • Error in PR,PO

    Hi All, We had  submitted PR 111111 back in February.    It showed up in the buyer's queue and he generated the PO.   Since then it has shown up two more times. We need to stop this . Please help me how to  fix this. Thanks.

  • How MBRL hold ME21N

    Hi Friends; Here in company when user make return of goods from MBRL PO is available and user need that PO will be unavailable or hold, how us can do it? I think that is type Mvm, would is it? Thanks. Best regards.

  • Color balance differs in driver preview from LR

    Can anyone explain why I might be seeing a very slight but noticeable difference in color balance from what I see in LR and in the driver Print Preview (this also is reflected in the print output)? Seaside outdoor daylight cloudy leaning towards gree

  • Gaslight could not open in 64 bit mode

    Since upgrading to Lion everytime I open iTunes I get this message. There's really no other information other than a check box saying don't show this again and a suggestion to try opening iTunes in 32 bit mode, neither of which I really care to do. I