1

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.

Samuel Lelièvre
  • 3,212
  • 1
  • 14
  • 27
Bryan
  • 3,224
  • 9
  • 41
  • 58

3 Answers3

5

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

mr.w
  • 51
  • 1
  • 2
  • Thanks, it's been a few months since I set this up, but as it happens, I'm about to have to move my .net app to another server that doesn't have Sage installed, so I'll give this a try. - I definitely don't want to install sage on a server if I can avoid it. – Bryan Nov 11 '12 at 17:28
0

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

ashga
  • 266
  • 1
  • 10
  • As per the question `The ODBC configuration has been confirmed too.`. The ODBC configuration is correct, the problem is with the installation of the drivers. – Bryan Mar 03 '14 at 12:51
-1

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.

Bryan
  • 3,224
  • 9
  • 41
  • 58
  • @ashga actually, according to sage, this is the solution. Personally, I don't like it, as all I want is the ODBC driver to function correctly on the server, without the overhead of the Sage Accounts application. – Bryan Mar 03 '14 at 12:49
  • 1
    I have been working on a native ODBC application (in C) that needed to access Sage Line 50 data files. I had spent a good half day trying to get the 32bit ODBC driver to work but had no luck, even after I installed the full-fat application on my machine! I know this is still only a work around but it would seem that the 64bit ODBC driver, available for v23, does seem to work without much hassle. https://my.sage.co.uk/public/help/askarticle.aspx?articleid=35159 – tribeca Nov 17 '16 at 15:16