I am using a Postgres database to save some calibration data using the Database Connectivity Toolkit. There will be multiple calibration stations on a network all saving data to the same database. If the network is down, each station will save calibration data to a local (and identical) database. To make station setup easy I am using a .dsn file to connect to the local database.
I got the .dns file working on my development machine, but it doesn't work on the first calibration station PC. Both machines have LV2014 as well as the same version of Postgres and the same drivers installed (I'm still working in the development environment, but will deploy as an .exe for the final implementation). Right now I'm just trying to get the local database connection to work. I created the database on the second PC by making a backup of the original database, and using that backup to create the database on the second PC.
When I try to connect on the second PC I get the following error:
I created a new .dsn file on the second PC and I get the same error. The two .dsn files look identical. The database on the second PC has the same name and structure as the one on the development machine.
Here is the content of the .dsn file:
DRIVER=PostgreSQL ODBC Driver(UNICODE)
Has anyone run into this before? Any ideas on where I've gone wrong?
Solved! Go to Solution.
Can't read anything in your picture. What OS are you using?
The error reads
Error -2147467259 occurred at NI_Database_API.lvlib:DB Tools Open Connec (String).vi->NI_Database_API.lvlib:DB Tools Open Connect (Path).vi->DB test program.vi
ADO Error: 0x80004005
Exception occured in Microsoft OLE DB Provider for ODBC Drivers:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->NI_Database_API.lvlib:DB Tools Open Connect (Path).vi->DB test program.vi
The development machine is 64bit. I am using 32bit LabVIEW. I don't know if the second PC is 32 or 64bit.
For 64 bit machines, when setting up a DSN, you should use the ODBC tool in the following location:
I think the default shortcut in the start menu points to a different EXE and doesn't work properly. Try the above exe and see if it works.
I will try that the next time I'm on site.
The DSN file worked on the 64bit machine (development machine), but did not on the second machine. I think I got to the ODBC tool through the control panel when I made the file. If the second machine is a 32bit machine, I will try making the DSN file using C:\Windows\System32\odbcad32.exe also.
should have previewed that reply -- the 😄 were inserted for ": D" without the space
Fix the profile settings within the discussions forums and you won't have this problem. See this message thread for what to do.