03-24-2014 11:48 AM
I am working with CVI2012. I have an application that uses the SQL toolkit. I made a distribution and installed it on a target machine (Windows 7 with the CVI2012 runtime engine). However when I install the application on another target (also a Windows 7 machine and also with the CVI2012 runtime engine) I cannot not initialize the database. The application fails on a call to DBInit(DB_INIT_MULTITHREADED). I get an error of -100: DB_FAILED_TO_LOAD_DLL. (I am using SQL Anywhere 11.) I know that the ODBC configuration is the same on both targets and I can access the DB manually through Interactive SQL.
I am baffled by this. After some searching I found that the file "cvidb32.dll" was not in the system32 directory so I copied that over. Still no joy. (I would also expect this to be installed when I installed the RTE. I did not have to manually copy this file on to the computer where the application does work.) I have checked the forums here have not found a solutionl. One post discussed running sqldistsupp.exe after the installer. I tried this and got an error "Driver's ConfigDSN, ConfigDriver or ConfigTranslator failed in function SQLConfigDataSource". Another post suggested simply adding CVISQLShared.msm to the installer. I tried this but it did not fixt the problem. I also tried downloading the SQL Distribution Toolkit help and it turns out the file has no content under the help topics.
Clearly something is missing but I don't know what. I tried running Dependency Walker to find the missing DLL but it did not show anything was missing.
Thoughts?
Thanks.
03-24-2014 12:41 PM
I have not distributed any applications with sql functionality, but looking at the following links it seems it can be a little tricky:
LabWindows™/CVI SQL Toolkit 2.2 Readme
03-24-2014 12:53 PM
It looks like I missed that I copied "cvidb.dll" to my target instead of "cvidb32.dll". When I put the cvidb32.dll file in place the application started working. However I still don't understand why the file was not put in place by the RTE installation.
03-24-2014 05:37 PM