如何使用在64位Server 2008的32位ODBC驱动程序时,安装程​​序不会创建一个标准的DSN? [英] How do I use a 32-bit ODBC driver on 64-bit Server 2008 when the installer doesn't create a standard DSN?

查看:159
本文介绍了如何使用在64位Server 2008的32位ODBC驱动程序时,安装程​​序不会创建一个标准的DSN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我们使用在我们的计算机实验室跟踪软件许可使用一些第三方软件。我们最近迁移应用程序到64位Server 2008的接收保证的公司,这是兼容的,并运行表明,该应用程序在64位环境中工作过的一些preliminary测试之后。不幸的是在做测试的人没考一对夫妇依赖于访问数据,以做到既在线 - 和后处理的数据产生一些报告应用程序,我的功能。

I ran into an issue with some third party software that we use to track software license usage in our computer labs. We recently migrated the app to 64-bit Server 2008 after receiving assurances from the company that it was compatible and running some preliminary tests that showed that the app worked in the 64-bit environment. Unfortunately the person doing the testing didn't test the functionality of a couple of apps that I have that rely on accessing the data to do both live- and post-processing on the data to produce some reports.

原来,该应用程序没有一个64位的ODBC驱动程序访问其内部数据并不能使用64位SQL Server ODBC驱动程序的数据导出到SQL Server。它包括并安装32位ODBC驱动程序,但安装它作为一个用户数据源,而不是一个系统数据源,这意味着我在运行实时采集窗口服务是不是能够找到它。我也不能创建一个系统DSN,因为数据源管理控制台找不到安装的驱动程序。

Turns out that the application doesn't have a 64-bit ODBC driver to access its internal data and can't use a 64-bit SQL Server ODBC driver to export its data to SQL server. It does include and install a 32-bit ODBC driver, but it installs it as a User Data Source, not a System Data Source, meaning that my windows service that runs the live collection isn't able to find it. I'm also not able to create a System DSN since the Data Sources admin console can't find the installed driver.

我的问题是如何配置的数据源,这方面,我可以从C#访问/。NET Windows服务在系统帐户下运行?

My question is how do I configure a data source for this connection that I can access from a C#/.NET windows service running under a system account?

自从我想出了一个办法做到这一点,我会提供我的解决方案作为一个答案(在符合常见问题解答如何回答你自己的问题)。

Since I've figured out a way to do it, I'll provide my solution as an answer (in keeping with the FAQ on how to answer your own question).

类似的: <一href="http://stackoverflow.com/questions/1131479/what-software-exists-for-bridging-a-64-bit-odbc-app-to-a-32-bit-odbc-driver-on-wi">What桥接64位ODBC应用程序,以一个32位的ODBC驱动程序在Windows上的软件存在?

推荐答案

事实证明,你可以使用创建32位ODBC连接C:\ WINDOWS \ Syswow64资料\ odbcad32.exe的。我的解决方案是创建32位ODBC连接为一个系统DSN。这还是没有让我连接到它,因为.NET无法查找。经过显著和无觅处找到如何让OdbcConnection类查找在正确的地方的DSN的,我偶然发现一个网站,建议修改注册表来解决不同的问题。

It turns out that you can create 32-bit ODBC connections using C:\Windows\SysWOW64\odbcad32.exe. My solution was to create the 32-bit ODBC connection as a System DSN. This still didn't allow me to connect to it since .NET couldn't look it up. After significant and fruitless searching to find how to get the OdbcConnection class to look for the DSN in the right place, I stumbled upon a web site that suggested modifying the registry to solve a different problem.

我结束了创建直属 HKLM \ SOFTWARE \ ODBC ODBC连接。我看着在SysWOW6432关键的发现,被设置为使用32位版本的ODBC管理工具,并在标准位置重新创建此参数。我没有为司机然而,添加一个条目,因为这不是由标准安装的应用程序安装在任。

I ended up creating the ODBC connection directly under HKLM\Software\ODBC. I looked in the SysWOW6432 key to find the parameters that were set up using the 32-bit version of the ODBC administration tool and recreated this in the standard location. I didn't add an entry for the driver, however, as that was not installed by the standard installer for the app either.

创建条目(手)后,我启动了我的Windows服务,一切都是幸福的。

After creating the entry (by hand), I fired up my windows service and everything was happy.

这篇关于如何使用在64位Server 2008的32位ODBC驱动程序时,安装程​​序不会创建一个标准的DSN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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