LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Error on ODBC

under the debug condition, I can use the ODBC to connect the MS Access database, but once buid the the application in release condition , the application can not link the database . What is wrong ? please give an advise. thanks.


David
0 Kudos
Message 1 of 9
(4,718 Views)
Replenish :

Just use "hdbc = DBConnect("DSN=MyData");", then determining if hdbc <=0 , the result is true , so can not open the data source .
Under the debug version , the sentence does not have any error , why under the release version , it can not open the source? by the way , the SQL toollib version is 2.0.6 , and CVI version is 7.1 , using MS Access 2000 as database.


David
0 Kudos
Message 2 of 9
(4,701 Views)
Replenish :

Just use "hdbc = DBConnect("DSN=MyData");", then determining if hdbc <=0 , the result is true , so can not open the data source .
Under the debug version , the sentence does not have any error , why under the release version , it can not open the source? by the way , the SQL toollib version is 2.0.6 , and CVI version is 7.1 , using MS Access 2000 as database.


David
0 Kudos
Message 3 of 9
(4,701 Views)
David,

Did you perhaps move this project to another computer? A DSN does not travel between machines, it must be re-created on each new machine that you install your program on.
0 Kudos
Message 4 of 9
(4,693 Views)
Hello davidLee,

Did this post not address your question?

Thanks.

Message Edited by Wendy L on 05-24-2005 05:11 PM

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 5 of 9
(4,683 Views)
You can get the error code / message , by uisng DBErrorMessage (); for example and see what happens.
What is the error ?.
0 Kudos
Message 6 of 9
(4,675 Views)

Hi,

I have an another problem with odbc driver, on one computer my soft work as well as possible, but on an another computer i receive the windows report log (send to micorsoft or don't send to microsoft windows) on DBConnect(DSN="MyDb"). I don't understand this problem, I try to format the second computer but the bug is always here.

If I start my program with LabWindows (with the play button) i never have a bug, I have it only when we start the program direcly by the .exe. What's is the difference between the clic .exe and the play by LabWindows ?

In your experience did you had this problem ?

 

Tks for your answer

Ps : sorry for the bad english 😉

0 Kudos
Message 7 of 9
(4,314 Views)
Hi Franckylagaine,

Are you receiving any error when you run your code inside your development environment (with the start button)?  Have you tried creating a debuggable .exe?  Does this produce a Windows error?

The main difference between running your code in the development environment versus in an executable would be the ability to catch a runtime error and debug it.
Jessica
National Instruments
Product Support Engineer
0 Kudos
Message 8 of 9
(4,283 Views)
Yes I try with a debug but in this case I don't receive any warning message. The problem is only with the release .exe. For all communication with my databe I use "SQL Toolkit".
0 Kudos
Message 9 of 9
(4,277 Views)