有访问文件的ODBC连接问题。 [英] having problem of ODBC connection with access files.

查看:83
本文介绍了有访问文件的ODBC连接问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我遇到与访问文件的ODBC连接问题。我从客户端获得了2个访问文件,一个用于包含接口的程序文件,另一个是仅包含表格的数据文件。



程序文件应该连接通过ODBC连接到数据文件但无法连接。我所做的是:



1.使用访问驱动程序创建DSN并将该ODBC连接命名为程序文件中预先设置的名称并指向数据通过在对话框中选择数据文件来获取文件 - 错误:ODBC - 与< ODBC DSN名称>的连接失败。



2.通过选择外部数据重新创建指向ODBC数据库的链接。 > "更" > ODBC数据库 > 将源数据链接到当前数据库中的新表 > 机器数据源 >选择我创建的DSN。 - 错误:您不能使用ODBC从外部Microsoft Access或ISAM数据库表导入,导出或链接到您的数据库。



3。从Excel尝试相同的DSN,看它是否正常工作 - 工作正常。



环境:

- Windows 7专业版

- 尝试使用MS Access 2010和2007 - 结果相同。



我用google搜索错误的含义,但我发现我可以使用SQL驱动程序而不是DSN设置中的访问驱动程序,这是不正确的。



如果您有任何解决方法,请告诉我。



谢谢!

Hi There, I am having problem of ODBC connection with access files. I got 2 access files from client, the one for the program file including interface, the other one is data file that only contains tables.

The program file supposed to connect to the data file through ODBC connection but it failed to connect. What I done is following:

1. Create DSN with access driver and named that ODBC connection as the name that pre-set in the program file and point to the data file by selecting data file in the dialog. - Error: ODBC--connection to <ODBC DSN name> failed.

2. Recreate link to ODBC Database by selecting "External Data" > "More" > "ODBC Database" > "Link to the source data into a new table in the current database" > "Machine data source" > pick the DSN Ive created. - Error: "You cannot use ODBC to import from, export to, or link an external Microsoft Access or ISAM database table to your database."

3. Tried that same DSN from Excel to see if its working - Working fine.

Env:
- Windows 7 Pro
- Tried with both MS Access 2010 and 2007 - Result is same.

I googled what the error means but what I found is that I could be using SQL driver instead of access driver in the DSN setting which is not true.

Please let me know if you have any clue to resolve this.

Thanks!

推荐答案

错误信息非常清楚。



转到外部数据,不要选择 ODBC ,但选择 Access

然后查找数据库文件并链接你需要的表格。
The error message is quite clear.

Go to External Data, don't pick ODBC but pick Access.
Then look up the database file and link the tables you need.


这篇关于有访问文件的ODBC连接问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆