LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Error : After more than 2000 times connect to database.

Dear all:

After connect to the database more than 2000 times ,CVI shows below error,( I also used the DBdiscoected to  free system resources ) 

It seems out of memory, but when I checked the memory usage with resource track , memory leak is not found .

and the physical memory of PC is enough .

 

All of your advice is appreciated.

Tks

CVI sql error.JPG

0 Kudos
Message 1 of 8
(4,300 Views)

Hi -

 

I just setup an ran a simple program which connected and disconnected from a databse 2500 times without error. My program was simply a loop around DBConnect and DBDisconnect, checking for errors after each call.

 

Please tell us more about your system. What version of CVI are you using? Also, what is your OS? How many connections do you have open at a time?

 

Also, from your screenshot, I see that it mentions "Native error code -2147024882". According to this KnowledgeBase article, native error code messages mean that an error occurred in the database itself, and the code is being passed back to CVI to be handled. From a quick google search on this error code, it appears to mean "Not Enough Storage is available to complete this operation".

 

If you are able to condense your code into a version that we can run, which reproduces the error, you can post it and we'll take a look at it. Also, I would recommend looking more into the -2147024882 error in regard to the database that you are using.

 

Best Regards,

 

John M

National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,258 Views)

Hi John:

Thanks for your advice.  Please review my reply as below:

Version of CVI : CVI 9.0 ; 

OS : Windows XP for Chinese traditional.

Connections :  About 2.5s each time,  3 tables with about 30 colums to be operated after conection . 

 

Yes the error code indicated it is not enough storage is available to complete the function of DBconect .I would like to debug the code as per your advice first ,I will post the code if I can't solve this issue , I will keep you updated if there is any news.

 

Jack Li

Best Regards!

TKS !

0 Kudos
Message 3 of 8
(4,235 Views)

Dear John :

I just setup an run , executes a SQL statement for 20 tims ,I found so many reource is not relesed as below ,I don.t known whether it  caused the issue,please advise .

Tks!

 

 Resource not release

0 Kudos
Message 4 of 8
(4,192 Views)

hi all,


after sean your program i've get that you have starting a database connection on opening your application and disconnect on the end.
so if you want to execute your program correctly we should realized 3 step for any transaction:
- databaseconnect
- execute the transaction
- databasedisconnect
in this file we have realized the modification that you need to execute your program
(14_V2.zip (winzip145))


Finally if your application turn correctly we will payed to me a coffe Smiley Happy
 

0 Kudos
Message 5 of 8
(4,178 Views)

Dear All:

Thanks for your advice.

Doing function "BDeactivateSQL " after excute the statement ,would release the source.

but it is still not the root cause to lead the “Not Enough Storage is available to complete this operation” error in  first floor。

 

 

Tks !

0 Kudos
Message 6 of 8
(4,156 Views)

Dear All:

it is curious to me that  I run the code in another OS (Chinese Simplified) for 57000 tims , there is no error happend. After checking the ODBC management, and no difference found between the two OS . Now I really don't know what to check next .  please advise .

 

All of your advice is appreciated

Tks!

 

Jack Li .

0 Kudos
Message 7 of 8
(4,112 Views)

Hi Jack,

 

Would it be possible for you to try running the program on another computer using the same operating system you started with?

 

Best,

 

John M

National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(4,087 Views)