#58 ComboPooledDataSource / Microsoft Access Text Driver

v1.0 (example)
open
nobody
None
2
2014-08-18
2014-01-27
murat
No

Hi,

I have problem to communicate over jdbcodbc driver to Microsoft Access Text Driver. Actually it founds the driver class, it founds the jndiurl. But there are some problems in the log like:

*Connection.getTransactionIsolation
Connection Option (SQLGetConnectOption), hDbc=105063200, fOption=108
RETCODE = -1
ERROR - Generating SQLException...
SQLState(S1C00) vendor code(106)
java.sql.SQLException: [Microsoft][ODBC Text Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)


and

RETCODE = -1
ERROR - Generating SQLException...
SQLState(08004) vendor code(-1036)
java.sql.SQLException: [Microsoft][ODBC Text Driver] Too many client tasks.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)


mycode is:

package com.oce.epos.support;

import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import com.mchange.v2.c3p0.ComboPooledDataSource;

public class JndiBindingTest {
/*
* @param args

/
public static void main(String[] args) {

    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";

    String url = "jdbc:odbc:Driver={Microsoft Access Text Driver (*.txt, *.csv)}";

    ComboPooledDataSource cpds = new ComboPooledDataSource();

    try {
        cpds.setLogWriter(new PrintWriter(System.out)); 
        cpds.setDriverClass(driver);
        cpds.setJdbcUrl(url);
        Connection con = cpds.getConnection();
        // Getting database info
        DatabaseMetaData meta = con.getMetaData();
        System.out.println("Server name: " + meta.getDatabaseProductName());
        System.out.println("Server version: "
                + meta.getDatabaseProductVersion());
        con.close();
        cpds.close();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

}

to use the functionality on microsoft on 64bit system it should be installed following libs:

http://www.microsoft.com/en-us/download/details.aspx?id=13255

otherwise ist the url:
jdbc:odbc:Driver:{Microsoft Text Driver (.txt; .csv)}"

I send you the entire logfile as attachment.

Thank you in advance!

best regards,
murat

1 Attachments

Discussion

  • murat

    murat - 2014-01-27

    updat:
    It is working with DriverManagerDataSource the problem is with ComboPooledDataSource.
    Microsoft Access Text Driver is set as pooled: nothing changes.

    thanks again

     
  • murat

    murat - 2014-01-27

    update: setting cpds.setMaxPoolSize(0); or cpds.setMaxPoolSize(1); changes nothing. I tried a lot of combination also with other properties.

    correction: on 32bit the url is: jdbc:odbc:Driver={Microsoft Text Driver (.txt; .csv)}

     
  • murat

    murat - 2014-01-27

    jdbc:odbc:Driver={Microsoft Text Driver (.txt; .csv)}

    stars are not shown before .txt and .csv

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks