简体   繁体   中英

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. It uses on ODBC connection on Windows 7 x64, and works perfectly. Sage accounts data is located on a mapped network drive.

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.

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:

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.

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). 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.

I haven't rebooted the server since copying the DLL file over the old one (it's a production server). Does the server require a reboot for the new DLL to take effect, or is there another way of triggering this?

Maybe I'm barking up the wrong tree, is the Sage ODBC driver DLL version irrelevant? Any help greatly appreciated.


Edit

Had an opportunity to reboot the server, and the new DLL hasn't made any difference. I still see the same error.

Had the same problem on a clean windows 8 install. The fix was to install the .net 3.5 runtime.

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).

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM