Jdbc non-odbc-bridge for Access mdb database

I would like to have my Java program be able to use a MicroSoft Access-97 or Access-2000 mdb database. I don't want to use an odbc driver, but instead use a type-2 or 3 or 4 driver (preferrable type-4).
Does such a driver exist? This is for a freeware project, and I would prefer a free or very low cost driver.
I'm not sure I fully understand the differences between jdbc types. My impression is that an odbc-bridge driver requires that the end-user setup the odbc connection. I'd like to avoid that if possible.
My intent is to distribute the application with the MyApp.mdb database file, and have MyApp be able to use the database without user setup.
I suppose an alternative would be to programmatically create the odbc-bridge data source configuration. Is that possible from a java program, and, if so, how? I can do this with Visual C++, but not clear on how to do in Java

Searching the forums is always a good idea.
From one of the previous times I answered this.
http://forum.java.sun.com/thread.jsp?forum=48&thread=199027

Similar Messages

  • How to access MDB database from JSP Web Application?

    hi
    i am using tomact and developing appplication in which i have to insert data into MDB database and read/Update/Delete Data in MDB DataBase.
    could any help in this issue?
    Thanks
    Regards
    Oersla Afroze Ahmed

    Hi,
    For accessing MDB database, you must have a jdbc:odbc driver, u can get it from sun site.
    just put it into the lib folder of web server.
    or
    just follow the following link:
    http://www.developer.com/db/article.php/3571661
    keshri

  • How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?

    Sir,
    How to create db conn for JDBC-ODBC Bridge for MS Access in ADF APP?
    Regards

    Hello Every Body!
    I succeeded in getting connect to the ms access database in adf application in jdeveloper as below:
    First in control panel to to admin tools and  go to data source(odbc) and create system dsn as bellow pic
    Then go to jdeveloper resources ide conn and then database and new database conn and then select jdbc-odbc briddge and then give custom jdbc url as bellow pic
    Cheers
    tanvir

  • Concurrent users unable to open a shared Microsoft Access MDB database

    I have a share on a Cisco NSS2000, the NSS is in Workgroup mode (Firmware 1.13).
    Every user have read/write rights on this share.
    When I try to open an access MDB database from this share it happens that only a single user at time can open the database.
    The second user that try to open the database get a "Cannot lock file" error message.
    So, when a user has the Access DB opened, no-one other can open (or connect to) the same DB.
    It's impossible to open the DB using the access IDE ("Cannot lock file" error message).
    It's impossible to make multiple connection to the DB using OleDB ("Cannot lock file" error message).
    I've tried give full access to the mdb file.
    I've tried give full access to the mdb folder.
    I've even tried to give full access to the temporary LDB file.
    I always get the same error message.
    Is there a workaround?
    Thanks, Max

    I've finally been able to update the firmware to the latest 1.16.
    Now everything works fine, problem solved! :)
    Thanks,
    Max
    catung wrote:Max,Please update your firmware to the latest posted version, 1.16.Thanks-carl--Carl TungSBTG - PE, Storage
    From: IsiSviluppo <[email protected]>
    Reply-To: "[email protected]"
    <[email protected]>
    Date: Wed, 07 Apr 2010 00:07:20 -0600
    To: Carl Tung <[email protected]>
    Subject: Small Business Network Storage New message: "Concurrent users
    unable to open a shared Microsoft Access MDB database" YbIMb-16E-b7l
    catung,
    A new message was posted in the thread "Concurrent users unable to open a
    shared Microsoft Access MDB database":
    https://www.myciscocommunity.com/message/42739#42739
    Author  : IsiSviluppo
    Profile : https://www.myciscocommunity.com/people/IsiSviluppo
    Message:

  • JDBC-ODBC-Bridge connection to SQL Database

    Hi guys
    I have a problem. I've made a little game which I want to put on my website. It has a highscore-list which I want to connect to my web host's database server to get the current list.
    I tried this with JDBC and got it to work locally but when I uploaded it to my site it didn't work. I contacted my web host's technical support who told me that their server didn't have the JDBC driver and that I should use ODBC instead. I did lots of reading and found out about this JDBC-ODBC-Bridge. I have since been trying to implement this into my program but hasn't been successful.
    In my original JDBC connection I used
    private String url = "jdbc:mysql://" + host +  "/" + mydatabase;
    Class.forName("com.mysql.jdbc.Driver");
    Connection connection = DriverManager.getConnection(url, username, password);Now I'm trying
    private String url = "jdbc:odbc://" + host + "/" + database;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection(url, username, password);But, at least when trying it locally, I get the error
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name is too long.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at HighscoreDB.readFile(HighscoreDB.java:53)
    at HighscoreDB.displayList(HighscoreDB.java:97)
    at HighscoreDB.main(HighscoreDB.java:33)Please help ;)
    Edited by: YZF-R1 on 2009-apr-09 13:26

    YZF-R1 wrote:
    masijade. wrote:
    Do you know what ODBC is?I think I at least have the basic idea, I learnt most of what I know from this post:
    [http://forums.sun.com/thread.jspa?threadID=211735&start=2&forumID=48]
    masijade. wrote:
    While "reading about this JDBC-ODBC Driver" did you also read about how to enter the URLs for it?No, I couldn't find that piece of information, why don't you tell me ;)
    Here
    >
    masijade. wrote:
    Did also read about the fact about needing to configure ODBC DSNs? Or about the fact that the connection URL is radically different if you don't configure one?No I did not. Please explain =)
    Here
    >
    PhHein wrote:
    Plus, JDBC-ODBC Bridges are evil!I'm beginning to realize this myself :O:(
    BalusC wrote:
    Drop that whole ODBC idea and just gently read the documentation which come along with the MySQL JDBC driver.I read a lot of it when I used the JDBC driver locally but how's that going to help me if the server doesn't have the JDBC driver installed?How will the Bridge help you if the ODBC Driver is not installed? And, the JDBC Driver (the Type 4.0 ones, which the MySQL Driver is) is 100% Java, so it can even be included in an Applet, if the HTML page that accesses it is done right, and the jars are "packaged" properly.

  • JDBC-ODBC bridge for MSSQL database

    Hi,
    I have SAP 2 MSSQL synchronous scenario and I need to select data from MS SQL 2005 database located on the remote system via XI 3.0. The database provides only ODBC access. I am using JDBC receiver and I would like to use sun.jdbc.odbc.JdbcOdbcDriver as a driver. I searched this forum, but the most of threads describe, how to connect to MS Access database, which is not my case. I used XI JDBC/FTP connection Test and XML Validation Application described in SAP Note 1085539 to test it. I used the following settings:
    Driver Class (fully qualified)   sun.jdbc.odbc.JdbcOdbcDriver
    JDBC URL                          jdbc:odbc:Driver://<host IP>;databaseName=<name>
    User Name                         my username
    Password                           my password
    I got the following error:
    Exception Occurred : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    Exception Stack Trace : java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
    My questions are: Is it possible to use sun.jdbc.odbc.JdbcOdbcDriver in this scenario? If so, what should I put as JDBC URL? Do I need to create DSN on the XI system? (it is a Windows NT based machine).
    Thanks a lot for your answers.

    Have you already deployed the drivers (msbase.jar, mssqlserver.jar, msutil.jar) ??
    If so,
    The JDBC drivers should be:
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    And the connection should be:
    jdbc:microsoft:sqlserver://hostname:1433;DatabaseName=name
    else
    For the drivers:
    http://developers.sun.com/product/jdbc/drivers

  • JDBC ODBC bridge for MS Access - language/locale problems

    Hi,
    I have an application that uses a MS Access database.
    I have a user in Turkey that is experiencing the following problem:
    My Java app requests for example the following query:
    select name from activitiesThen I get the following error:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]
    The Microsoft Jet database engine cannot find
    the input table or query 'ACT�V�T�ES'. 
    Make sure it exists and that its name is spelled correctly.Apparantly the character 'i' is replaced by '�', how can I avoid this?

    Hi,
    I was looking for something in that direction.
    When I start the db connection using charset="Turkish" i get the following error:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d6cb0b2, pid=4480, tid=5000
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode)
    # Problematic frame:
    # V  [jvm.dll+0x8b0b2]
    # An error report file with more information is saved as hs_err_pid4480.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    #Is this because my MS Access does not recognize the charset?
    What should I use if I don't pas the 'Turkey' argument, just 'utf-8'?
    Message was edited by:
    fredje_2000

  • Is Sun's JDBC-ODBC Bridge on Access stable?

    I need some opinion here.
    Thanks
    Setya

    Thanks,
    I plan to build enterprise app using EJB with Oracle or MSSQLServer as the back end. Since our table structure does not always satisfy the table structure required for reporting (which sometimes is very complex), we plan to pull the data from the EJB first and then put it in the MSAccess temporary tables in stand alone client app (which satisfy the structure required for reporting) and from here we present the reports to users.
    Any suggestion regarding this plan would be greatly appreciated.
    Thanks
    Setya

  • Which ojdbc14.jar JDBC driver to use for Oracle 10g database

    When ODI is installed there seems to be an Oralce JDBC driver in place in the drivers folder (ojdbc14.jar).
    When we connect to an Oracle datastore and point to a table and use the 'reverse' function to populate the columns - it sort of works OK but does not bring back the datatypes properly. This is found to be when the Oracle table has UNICODE character datatypes NCHAR and NVARCHAR. If a table has CHAR and VARCHAR it is all OK but any table that has UNICODE datatyoe has a problem.
    Is this likely to be the JDBC driver ?
    We have tried replacing this ojdbc14.jar with the older classes12 and this, as expected, did not resolve the issue.
    We then tried replacing it with the latest 10.2.0.4 ojdbc14.jar but again no difference.
    Does anyone have any experience with Oracle JDBC drivers and what release level to use - and using against UNICODE datatypes in tables ?
    Regards

    Our problem is that when we use 'reverse' to populate the columns from a physicla table in an Oracle database - ODI is obviously 'seeing' the ORacle table and is correctly understanding the columns in the table and defining them in it's model - but wherever there is a column with a datatype in the ORacle database of NCHAR or NVARCHAR it fails to populate the datatype or the 'length' of these columns. If I manually try to specify the datatype these 2 unicode data types do NOT exist in the pull down list of datatypes.
    I see what you are asking - if these datatypes are actually defined as datatypes within the actual technology - I cant access my lab right now but will check as soon as I can. Thanks for the suggestion.

  • Issues while JDBC System Object Creation for accessing MS SQL 2000 Server

    Dear Experts,
    I am creating system object to connect to MS 2000 server in Ep 7.3
    1) created system with all the properties
    2) User mapping done
    3) permissions ok
    but still while testing connection its giving error
    "No connection to system DBSQL found:
    com.sapportals.connector.connection.ConnectionFailedException: Connection Failed: A nested exception occurred. Could not initialize physical connection.
    Connection Failed: A nested exception occurred. Could not initialize physical connection.
    Connection Failed: A nested exception occurred. Could not create JCO connection.
    'user' missing"
    """ Connection Test for Connectors:
    Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the back-end application using the connector defined in this system object
    Results
    Default alias retrieved successfully
    Connection failed. Make sure user mapping is set correctly and all connection properties are correct. """"

    Dear Mr. Arun,
    thanks for the valuable sap note
    I have applied the note but same result :
    No connection to system DBSQL found:
    com.sapportals.connector.connection.ConnectionFailedException: Connection Failed: A nested exception occurred. Could not initialize physical connection.
    Connection Failed: A nested exception occurred. Could not initialize physical connection.
    Connection Failed: A nested exception occurred. Could not create JCO connection.
    'user' missing
    1) i have created JDBC Driver as mentioned in sap note
    2) created System object
    3) created destination as required in EP 7.1 and above
    4) mapped user in user administration
    when i am testnig connection its giving above mentioned error
    same system object when i am creating for EP 7 its working fine with all 3 jar files and system creating succesfully
    plz help

  • Possible to use a message bridge for access to message copies?

    I'd like to be able to consume copies of messages that go across a queue so that they can be validated during testing.
    I've been unable to find any mechanisms for authenticated message monitoring which exists in other JMS brokers such as TIBCO EMS and so I'm going down the route of seeing whether a message bridge could help me. My thinking is that I can bridge from QueueA onto TopicA - where the message stays on QueueA and a copy is sent to Topic A which can be safely consumed by the testing tool
    First question - is this a workable solution, ie does the message sent to QueueA stay on QueueA until is is consumed normally, or is the message forwarded to the bridged TopicA thus removing the original message?
    Second question - I've tried to get a bridge working but encounter an error when trying to use it. The monitoring tab shows the bridge is up OK but I get the exception below in the admin console
    <11-Oct-2010 13:55:12 o'clock BST> <Warning> <MessagingBridge> <BEA-200026> <Bridge "Bridge-0" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was javax.resource.ResourceException: Error sending message.)>
    Any help and advice appreciated
    Stuart

    One approach is to use a topic; producers send to the topic and both of your application consumer and your auditing consumer consume from the topic. If you have multiple application consumers, you could have a bridge to forward the messages from the topic to a queue and your applications consumers can consume from the queue, while your auditing consumer consumes from the topic.
    There is a message life cycle logging capability in WLS JMS, which may be helpful. It can be enabled on a per destination basis. It logs an event in a file when a message is produced, consumed, removed, expired and etc. However the message body is not available in the log. The details can be found at
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13738/troubleshoot.htm#i1128815

  • ODBC driver for Cache (Intersystems) database?

    Hi, I am using Indesign to create catalogue pages and am trying to use the plug-in 'easy catalogue' by 65bit software to manage the catalogue data. The product data is stored in a cache database, on a windows server. I have tried installing the driver supplied by intersystems (makers of cache) but with no joy. (Had to install it through the terminal!) Anyone know of a way to connect to the cache database using a third party ODBC driver?
    Many thanks
    nhath

    Yep! :)

  • 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 to SPSS data files - Result Set Type is not supported

    Hello,
    As mentioned in the subject I am trying to read SPSS data files using the SPSS 32-Bit data driver, ODBC and the JDBC-ODBC Bridge.
    Using this SPSS Driver I manged to read the data directly into an MS-SQL Server using:
    SELECT [...] FROM
    OPENROWSET(''MSDASQL.1'',''DRIVER={SPSS 32-BIT Data Driver (*.sav)};DBQ=' SomePathWhereTheFilesAre';SERVER=NotTheServer'', ''SELECT 'SomeSPSSColumn' FROM "'SomeSPSSFileNameWithoutExt'"'') AS a
    This works fine!
    Using Access and an ODBC System DNS works for IMPORTING but NOT for LINKING.
    It is even possible to read the data using the very slow SPSS API.
    However, when it comes to JDBC-ODBC the below code does only work in part. The driver is loaded successfully, but when it comes to transferring data into the resultset object the error
    SQLState: null
    Result Set Type is not supported
    Vendor: 0
    occurs.
    The official answer from SPSS is to use .Net or to use their implementation with Python in their new version 14.0. But this is obviously not an option when you want to use only Java.
    Does anybody have experience with SPSS and JDBC-ODBC??? I have tried the possible ResultSet Types, which I took from:
    http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvdsprp.htm
    and none of them worked.
    Thank you in advance for your ideas and input & stay happy!
    Here the code without all the rest of the class arround it:
    // Module:  SimpleSelect.java
    // Description: Test program for ODBC API interface.  This java application
    // will connect to a JDBC driver, issue a select statement
    // and display all result columns and rows
    // Product: JDBC to ODBC Bridge
    // Author:  Karl Moss
    // Date:  February, 1996
    // Copyright: 1990-1996 INTERSOLV, Inc.
    // This software contains confidential and proprietary
    // information of INTERSOLV, Inc.
    public static void main1() {
      String url   = "jdbc:odbc:SomeSystemDNS";
      String query = "SELECT SomeSPSSColumn FROM 'SomeSPSSFileName'";
      try {
        // Load the jdbc-odbc bridge driver
        Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
        DriverManager.setLogStream(System.out);
        // Attempt to connect to a driver.  Each one
        // of the registered drivers will be loaded until
        // one is found that can process this URL
        Connection con = DriverManager.getConnection (url);
        // If we were unable to connect, an exception
        // would have been thrown.  So, if we get here,
        // we are successfully connected to the URL
        // Check for, and display and warnings generated
        // by the connect.
        checkForWarning (con.getWarnings ());
        // Get the DatabaseMetaData object and display
        // some information about the connection
        DatabaseMetaData dma = con.getMetaData ();
        System.out.println("\nConnected to " + dma.getURL());
        System.out.println("Driver       " +
          dma.getDriverName());
        System.out.println("Version      " +
          dma.getDriverVersion());
        System.out.println("");
        // Create a Statement object so we can submit
        // SQL statements to the driver
        Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.CONCUR_READ_ONLY);
        // Submit a query, creating a ResultSet object
        ResultSet rs = stmt.executeQuery (query);
        // Display all columns and rows from the result set
        dispResultSet (rs);
        // Close the result set
        rs.close();
        // Close the statement
        stmt.close();
        // Close the connection
        con.close();
      }

    Thank you for your reply StuDerby!
    Actually the above script was before, as you suggested, leaving the ResultSetTeype default. This did not work...
    I am getting gray hair with SPSS - in terms of connectivity and "integratebility" none of their solutions offered is sufficient from my point of view.
    Variable definitions can only be read by the slow API, data can only be read by Python or Microsoft Products... and if you want to combine both you are in big trouble. I can only assume that this is a company strategy to sell their Dimensions Platform to companies versus having companies developping their applications according to business needs.
    Thanks again for any furthur suggestions and I hope, that some SPSS Developper will see this post!
    Cheers!!

  • M$-Access non-odbc driver

    Does anybody know of a good, non-odbc, driver for M$- access?
    Thanks a lot for the help.
    Ylan

    I doubt there is such a thing.
    I would suppose that maybe ADO or OLE might provide an interface that doesn't go through ODBC, but I am not sure about that. And those solutions would require JNI.

Maybe you are looking for

  • Xorg freezes often!

    Hi all, is there any solution, workaround or fix for the Xorg freeze bug? Description: Xorg freezes often, no mouse (or mouse very slow), no keyboard, cold reboot required! Additional info: System: ArchLinux i686, 32bit Current packages: kernel 3.3.2

  • General Scrollbar Issues

    I see a lot of people posting about the scroll bar.  I use my iMac with a Wacom tablet.  When the scroll bar disappears on things like iTunes it never comes back. I borrowed a touch plate from a friend and placing two fingers on the touch plate makes

  • Function module or ABAP-OO method to start DTP via Coding

    Hello experts, is there any function module or ABAP-OO-method, which I can use to start DTP's via ABAP-Coding (e.g. in my own programm)? I know there are FM's to start, change, delete, etc. InfoPackges. Are there any functions like them also availabl

  • Looking for Directory structure

    Hi i am new bie to Tomcat . i was wondering if some explain me the directory structure for a web Application. like where to put the HTML files and where to put the Java classes and where to keep the JSP and what is the Importance of WEB-INF dir Thank

  • I need help please with arrows Graphics

    I want to creat a flow diagram in java swing. the nods will be a JButtons, and between this buttons I'll paint arrows with Graphics. I want to create this dinamic (the button as massege, in my database I have columns names: msg_id, msg_number): butto