LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DBConnect fail

DBConnect return -100;

When I move my released program to another computer, DBConnect failed and return -100.

But the program run OK on the computer where I build.

The computer where I move the program to has installed MS Access 2003,Word 2003, Excel 2003.

 

the code:

DBInit (DB_INIT_SINGLETHREADED);
 char CurrentPath[MAX_PATH];
 GetProjectDir(CurrentPath);
 char DBConStr[MAX_PATH];
 sprintf(DBConStr,"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s\\%s;Persist Security Info=False",CurrentPath,"Result.mdb");

 DBhandle=DBConnect(DBConStr);

0 Kudos
Message 1 of 2
(3,867 Views)

Hi JohndyWu,

you may need to read Distributing an SQL Toolkit executable or DLL topic in the toolkit help: there you can find hints about creating a distribution that installs all necessary support files on the target machine.

Unfortunately I have used it only for small tests so I cannot help you more than this.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,861 Views)