Link to home
Start Free TrialLog in
Avatar of snajalm
snajalm

asked on

Making an ODBC connection through System DSN set up under Windows ODBC Data Source Administrator?

'm trying to make an ODBC connection in Java through Windows ODBC Manager. I have managed to read the registry to get a listing of System DSNs and once a selection is made by the user I read the "HostMachine" parameter in the registry associated with the selected SystemDSN and from there I want to make that ODBC connection. I have tried the DriverManager getConnection method but it doesn't seem to work! Any ideas PLZ??!

Please note that I want to access the servers through their associated IP addresses and less likely urls, hence (HostMachine)!

Also each of these System DSNs are associated with a driver that would need to be used to connect its related data source!
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

You probably need to make the connections through registry writes. I would examine the registry at each step, as you move from finding candidates to actually making the connection *manually*
Check out the Windows docs too. Perhaps the following might be of help:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms714818(v=vs.85).aspx
ASKER CERTIFIED SOLUTION
Avatar of snajalm
snajalm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of snajalm
snajalm

ASKER

It finally got solved!