NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error System Level exception

Capblans -
Regarding the closing of handles, when you call the Open Database step, you must store the handle in a valid number property and call the Close Database step when done with it.  The same for Open SQL Statement and Close SQL Statement.  Please validate your step configuration for dealing with handles.

Using ODBC should work just fine, but it might be interesting to use the OLE-DB Microsoft SQL Server provider instead of the ODBC Provider with an ODBC driver just to see if there is a difference.

I am curious what version of TestStand are you using?

Scott Richardson
https://testeract.com
0 Kudos
Message 11 of 26
(2,836 Views)

Hi!

I close Database at the end of my sequence and I close SQL statement after reading the data. So for each access to data, I open SQL statement before and close SQL statement just after. But it doesn't work.

Capblans 

0 Kudos
Message 12 of 26
(2,832 Views)
Does your sequence consist only of database steps or are there other steps as well? If there are other steps, please try to rewrite the sequence so that only database steps are used in order to narrow down the possibilities. If the problem goes away when only database steps exist in the sequence then you know it's not related to the database steps, if it does still occur then it likely is related to the database steps. If it's not in the database steps then please provide more information about the rest of the steps in the sequence.

Hope this helps,
-Doug

0 Kudos
Message 13 of 26
(2,826 Views)

Capblans,

Your problem sounds suspiciously like a memory allocation error somewhere in the system.  I had a problem that was very similar to what you are describing and the cause was that I wasn't allocating memory appropriately.  It would work fine sometimes when I made calls to the database but the more information I got from the database the more frequently it crashed.  I don't know if you are using ODBC but if you are it's easy to get tripped up on memory allocation errors.  I'm not sure how TestStand does it, but when I bind data I usually allocate more memory to the buffer than I need simply because it makes my code a lot cleaner and the difference in memory allocation doesn't really matter.  Thus when I wasn't allocating properly in my other code some of the extra floating memory must have been getting used and I didn't see an exception until it had all been used up.

I'd definatly follow dug's suggestion and check your mallocs, callocs, and reallocs to make sure they are right.

0 Kudos
Message 14 of 26
(2,822 Views)

Hi!

I did this before asking questions in this forum and it doesn't work.

I created a sequence with only access to the database.

 

0 Kudos
Message 15 of 26
(2,820 Views)

Capblans -
I have looked for the "GET" SQL command that you are using and I cannot find it documented under Transact-SQL Reference.  What does this command do or what is the command translated to?

Scott Richardson
https://testeract.com
0 Kudos
Message 16 of 26
(2,816 Views)
This command get the value of the database at the current index or at the index you specified. This step is in the database steps, it's a SQL statement.
0 Kudos
Message 17 of 26
(2,812 Views)
capblans -
I would like to try to reproduce the problem, but I still cannot find any information on the 'GET' command on the mySQL web site or in the documentation that I have with my server installation.  Can you point me to the command in the documentation on their web site (www.mysql.com)?  The GET command does not seem to be a reserved word listed on http://dev.mysql.com/doc/mysql/en/reserved-words.html?  What version of MySQL are you using?
Scott Richardson
https://testeract.com
0 Kudos
Message 18 of 26
(2,796 Views)
Hi!
 
It's not a GET command it's a SQL statement step and when you configure this step you choose "Get value" and "sort by index". It's not a SQL problem it's a TestStand problem.
The correct SQL command is SELECT but in TestStand it's called GET.
 
 
0 Kudos
Message 19 of 26
(2,790 Views)
capblans -
Can you attach a simple example that loops on the database access and cause the error?  Also, please describe your table that you are fetching data from.

 
Scott Richardson
https://testeract.com
0 Kudos
Message 20 of 26
(2,779 Views)