Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running Java against an ODBC source on SBS2008

8 views
Skip to first unread message

Barton@discussions.microsoft.com Neil Barton

unread,
Nov 22, 2009, 10:18:02 AM11/22/09
to
I am working with a client using the Sage accounting package and I have
written a java program which runs against that database using the ODBC driver
supplied by Sage. It works in a 32 bit environment. It works in a 64 bit
Windows 7 environment. However, when I run it on the Small Business Server
2008 I get the error message: "Cannot connect to jdbc:odbc:BITSSageSrc error:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified".

If I go into control panel and ODBC sources I cannot see the odbc driver
from Sage as it is not 64 bit. Going into C:\windows\syswow64 and running
odbcad32 enables me to add the 32 bit driver as a data source and I can see
it listed in System DSN. This works at the client site where a java client
running on a 32 bit XP system can connect to the ODBC driver, however, when I
try to run the program on the server itself it cannot connect.

Because it works in a 64 bit Windows 7 environment I don't think it's simply
a 64 bit issue. I think it might be a security policy issue but I don't know
where to start to look for such a problem.

Alen Teplitsky

unread,
Nov 25, 2009, 8:56:59 PM11/25/09
to
On Nov 22, 10:18 am, Neil Barton <Neil

on 64 bit sql servers the tools are still 32 bit. try to create an
alias in SQL Server Configuration and point the ODBC DSN at the alias.

Pak-Ming Cheung - MSFT

unread,
Jan 29, 2010, 10:59:01 AM1/29/10
to
Since the Sage driver is 32-bit only driver, it cannot work with 64-bit
processes. It can only be called within a 32-bit process. Therefore, please
make sure you are using 32-bit processes.

Then, if your system is 64-bit, you have to add a (system or user) DSN via
c:\windows\syswow64\odbcad32.exe; if your system is 32-bit, you have to add a
DSN via c:\windows\system32\odbcad32.exe.

Given the error message, it doesn't look like there is any permission issue.
The ODBC driver manager will only read the registry to determine which driver
it should load based on the data source information. I suppose your
credential should have registry read permission, right? Instead, I think that
the most likely reason is that you may forget to add the system / user DSN in
the client.

If it still doesn't work, you can try to capture a BidTrace log or a ODBC
Trace log, and paste it here so that we can analyze it.


Thanks,
Ming.
WDAC Team, Microsoft.
P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)

"Alen Teplitsky" wrote:

> .
>

Neil Barton

unread,
Mar 31, 2010, 10:51:03 AM3/31/10
to
I worked it out. I had installed the 64 bit version of Java on the server.
Consequently it didn't work well with the 32 bit driver. I downgraded the
Java version to 32 bit and it now works. I'm sure they will come up with a 64
bit driver one day but I'm working for now.


Thanks for your help.

0 new messages