English 中文(简体)
Troubles with JDBC-ODBC, DSN-less connection strings, and 64-bitWindows 7
原标题:Troubles with JDBC-ODBC, DSN-less connection strings, and 64-bit Windows 7

I m处理一个申请的问题,I ve正在通过JDBC-ODBC与查阅档案链接。 在其他视窗平台上,这个问题没有遇到过,但在Windows 7 64-bit箱上,试图与无电离层扰动的连接线连接起来:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

试图在座标上出现多种差异,但所有改动都回去了同样的错误。 在这方面,它目前如何设法连接:

  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

  StringBuffer databaseConnectionString;

  if (SystemUtils.IS_OS_WINDOWS_7) {
       databaseConnectionString = new StringBuffer("jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=");
       databaseConnectionString.append(databaseFile);

  } else {
       databaseConnectionString = new StringBuffer("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=");
       databaseConnectionString.append(databaseFile);
       databaseConnectionString.append(";DriverID=22;READONLY=false}");
  }

资料来源:Admin证实,司机在场。 但是,当用regedt32.exe来审查ODBC司机编码时(HKEY_LOCAL_MACHINE/SOFTWARE/ODBC/ODBCINST.INI/ODBC司机)。

谁能帮助说明这方面的情况?

最佳回答

我发现问题在于,我正在瓦 Java64美分实施该方案。 尽管我尚未成功地对方案进行检测,如果方案在32个轨道或64个轨道的 Java中运行,我已经通过安装32个轨道的 Java时间环境以及使用一个如下的批号解决了解决办法:

@echo off

"C:Program Files (x86)Javajre6injava" -D32 -Xmx1024m -jar programName.jar

得到帮助!

问题回答

鉴于JAVA或MS sODBC司机缺乏有意义的错误信息,这是一个艰巨的挑战。 上文对选择32条轨道 Java和MS Access驱动因素(使用MSDatabaseEngine.exe)的答复确实奏效,但在处理其他行动时,与使用64条轨道 Java相比,费用很高(约30%)。 我不愿意支付这一价格,因此我安装了64比拉瓦(与32比拉合,两者都放在单独的目录中:Java32或64)。 后一个目录问题对我很重要,因为我正在使用阿帕奇·格洛宁莫,如果贾瓦被安装在方案档案中(x86),则不会开始,因为(x86)似乎杀死了其批量档案。 然后,我放弃了32个轨道管理系统,并安装了64个轨道管理系统(AccessDatabaseEngine_x64.exe)。 最后,它以更高的速度和多边开发银行的联系方式开展工作。





相关问题
Add 2 extra columns to an excel file

Since the Microsoft ODBC Excel Driver doesn t support ALTER TABLE/DELETE FROM(/UPDATE?) statements, I m using alternative ways of getting the right data in the right place. I still have one problem ...

Tracking SQL Calls From MS Access to MySQL

I m trying to see the SQL statements that are sent from MS Access 2003 to MySQL via ODBC. I ve tried ODBC Tracing, but it s painfully slow, producing very large log files which are very difficult ...

Update Array field in progress DB using ODBC

I access the progress DB using ODBC in my C# program, and I need to update some fields,which are array data type. so how can I write my sql statement to do such things? I read some progress ...

CakePHP and connecting to MS Access db using Unixodbc

I m trying to use an Acces (MDB) database from a CakePHP app. On a Windows machine this works fine. On a Linux machine using Unixodbc this doesn t work at all. The error is as follows: Warning (2): ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Filemaker GetAs...How to display Container Field on webpage?

I have an ASP.Net application that needs to display an image that is stored in a Filemaker Container field. My query statement looks like: SELECT GetAs(Image, JPG ) FROM UA_Item_Pictures WHERE "...

Informix ODBC Connection Help

I have a development project that requires us to be able to support informix data sources via ODBC. I ve downloaded the prebuilt Informix Virtual Appliance from the IBM website and am able see the ...

热门标签