I know you cannot connect to two companies at the same time with N/ODBC, but I cannot even connect to one company after the other.
I mean I have a Native Database, I have an SQL Server and want to copy tables from the Native Database for reporting into the SQL Server every night via DROP TABLE.... SELECT * INTO.... FROM OPENQUERY(NODBC_Comp1 ... If I try it one after the other with different companies it results in an authentication error, but if I restart my SQL Server (basically the "ODBC Client") in between it works i.e. it is something along the lines of after the first query the connection to the first company is not being closed properly.
This pretty much prevents consoldating our data so any ideas are welcome how to work this bug around i.e. how to close the N/ODBC connection after the OPENQUERY for one company is finished in order to be able to query another company. Restarting the SQL Server is not an option because you cannot do that automatically and it has to run automatically every night.
0
Answers
Did u checked the test connection after creating the ODBC connection???
If all else fails, try to install a second NAV ODBC using odbcconf.exe
Kanchanmanoj: of course, but did not help. Both connections work if I restart the SQL server (which is calling the OPENQUERY from the native database i.e. this is the ODBC client) between calls. The problem is this needs to run every night and I cannot manually restart the server.
I know there is a problem with ODBC, that don't close server connection.
Did you tried to use C/FRONT to transfer data ? I used it to transfer data betwen different DDBB and I think is faster than ODBC.
Bye
I recommend you run it from an elevated command prompt.
odbcconf.exe didn't work for me but I just copied the driver folder (microsoft dynamics nav / 60 / odbc) and hacked the registry directly:
in registry under ODBCINST.INI:
New key "Microsoft Dynamics NAV Driver 2" and two strings inside it Driver and Setup, and also under the ODBC Drivers key added the string "Microsoft Dynamics NAV Driver 2" and the value "Installed". After that I could create a data source and connect to first one company then after the other.
thanks again
hardest thing in my career - they really don't teach this sort of registry-hacking in the business school