简体   繁体   English

应用程序通过ODBC访问Sage Line 50数据时出错

[英]Error with app accessing Sage Line 50 data via ODBC

I've developed a simple C# console based application to pull some data from tables in Sage Line 50, and upload the data to a web server. 我开发了一个简单的基于C#控制台的应用程序,用于从Sage Line 50中的表中提取一些数据,并将数据上传到Web服务器。 It uses on ODBC connection on Windows 7 x64, and works perfectly. 它在Windows 7 x64上使用ODBC连接,并且工作正常。 Sage accounts data is located on a mapped network drive. Sage帐户数据位于映射的网络驱动器上。

The PC I've developed/tested this software on, has a full installation of Sage Line 50 2011, with v17 ODBC drivers, and has had all the updates applied. 我开发/测试了这个软件的PC,完全安装了Sage Line 50 2011,带有v17 ODBC驱动程序,并且已经应用​​了所有更新。

Ultimately the application will run as a scheduled job on our file server, but when I try to run the code on our Windows 2008 R2 file server (the same file server that hosts the Sage accounts data), an exception is thrown from the ODBC driver, as follows: 最终,应用程序将在我们的文件服务器上作为预定作业运行,但是当我尝试在我们的Windows 2008 R2文件服务器(承载Sage帐户数据的同一文件服务器)上运行代码时,ODBC驱动程序会抛出异常, 如下:

ERROR [28000] User ID or Password invalid
ERROR [01000] The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 2.00
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

The password error is a misnomer, as I know the password is correct. 密码错误是用词不当,因为我知道密码是正确的。 The ODBC configuration has been confirmed too. ODBC配置也已确认。

I've only installed the Sage ODBC driver from the installation CD, as I didn't want the full Sage application installed on our server, and noticed that the S17DBC32.dll file was a different version to the one installed on my workstation (probably because of the automatic updates that Sage accounts installs). 我只安装了安装光盘上的Sage ODBC驱动程序,因为我不希望在我们的服务器上安装完整的Sage应用程序,并注意到S17DBC32.dll文件与我工作站上安装的文件版本不同(可能)因为Sage帐户安装的自动更新)。 I've tried copying this newer file over the top of the original file on our file server, and recreated the ODBC config, but that doesn't help. 我已经尝试将这个较新的文件复制到我们文件服务器上原始文件的顶部,并重新创建了ODBC配置,但这没有用。

I haven't rebooted the server since copying the DLL file over the old one (it's a production server). 我没有重新启动服务器,因为将DLL文件复制到旧文件(它是生产服务器)。 Does the server require a reboot for the new DLL to take effect, or is there another way of triggering this? 服务器是否需要重新启动才能使新DLL生效,或者是否有其他方法可以触发此操作?

Maybe I'm barking up the wrong tree, is the Sage ODBC driver DLL version irrelevant? 也许我正在咆哮错误的树,Sage ODBC驱动程序DLL版本无关紧要? Any help greatly appreciated. 任何帮助非常感谢。


Edit 编辑

Had an opportunity to reboot the server, and the new DLL hasn't made any difference. 有机会重启服务器,新的DLL没有任何区别。 I still see the same error. 我仍然看到同样的错误。

Had the same problem on a clean windows 8 install. 在干净的Windows 8安装上有同样的问题。 The fix was to install the .net 3.5 runtime. 修复是安装.net 3.5运行时。

Windows actually suggested it itself, after my .net app failed with the same error (the same error thrown by MS-Access didn't prompt to install). 在我的.net应用程序失败并出现相同错误之后,Windows实际上建议了它(MS-Access引发的同一错误没有提示安装)。

您需要安装32位驱动程序,如果您通过进入64位版本的控制面板访问ODBC,您需要C:\\ Windows \\ SysWOW64 \\ odbcad32.exe

我最终试图在服务器上安装完全安装Sage帐户(yuk!),应用自动更新,现在我的应用程序正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Sage 50 v25 ODBC错误-驱动程序返回无效(或返回失败)SQL_DRIVER_ODBC_VER:25.0 - Sage 50 v25 ODBC Error - The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 25.0 将Sage Line 50与windows应用程序集成 - Integrate Sage Line 50 with windows application 如何将支付行转入Sage 50? - How to transfer payment line into Sage 50? 从Sage 50中的字段中提取数据到应用程序中 - Extracting data from a field in Sage 50 into an application 如何从Sage Line 50访问产品列表? - How to access the product list from Sage Line 50? 504 - 连接 sage50 云帐户时出现超时错误 - 504 - Time out error while connect sage50 cloud accounts 使用 Sage50 Canada 2019 的示例 sdk 代码创建销售发票时出现异常错误 - Getting exception error while creating sale invoice using sample sdk code of Sage50 Canada 2019 通过odbc通过dotnet访问oracle存储过程 - accessing oracle stored procedures via dotnet through odbc 查询花费比预期的odbc更长的时间 - Query taking longer than expected odbc sage 从C#通过ODBC访问Sql Server:错误[IM002] [Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序 - Access to Sql Server via ODBC from C# : ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM