Question

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.

Was it helpful?

Solution 3

I've ended up resorting to putting a full installation of Sage Accounts on the server (yuk!), applied the automatic updates, and now my application works fine.

OTHER TIPS

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

you need to install the 32bit driver and if you are accessing ODBC by going in to control panel that is the 64 bit version you need to C:\Windows\SysWOW64\odbcad32.exe

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top