03-13-2008 04:21 AM
03-13-2008 08:19 AM
03-13-2008 02:24 PM
03-14-2008 01:14 AM
Hi Markus,
oh, yes I told you no sense!! if you are in Pre Uut there wil be no only the locals of Pre Uut !! Sorry.
But what about trying Root instead Caller. I tried this in TS 4.0 and it worked
Just set a Break point in LogToDatabase you will see that it work
Greetings
Juergen
03-17-2008 02:29 AM - edited 03-17-2008 02:32 AM
Setting a breakpoint in the Databasesequence shows that Parameters.DatabaseOptions.ConnectionString does hold the expected changed value. But nevertheless TestStand still logs to the same database as opened for the first device.
We are using an Access database as backend, which creates a <database>.ldb lockfile when you are accessing <database>.mdb. And that lockfile exists still after logging the data to the database for the first device is finished and it never changes. And is removed only, when you leave the UUT loop by terminating the sequence. So I'am quite sure that ITSDBLog.LogResult(), which is called to do the database logging, just ignores any changed value of ConnectionString once is has opened a database but just holds the allready opened database open until you close the sequence. An single stepping when terminating the sequence also didn't reveal any step, which seems to close the database link. The lock was removed when a new sequence execution was started. Is there any easy way to change that behaviour ?
03-17-2008 04:26 AM
Hi Markus,
Are you closing the database using the Close Database step somewhere are the end of your Sequence?
Regards
Ray Farmer
03-17-2008 05:47 AM
03-17-2008 07:33 AM
Hi Markus,
That was a bit a stupid question of mine, I was think you were using the Database step types. ![]()
Had a quick look at the Database logging code, can't see where its is releasing the database. If its in one the destructors, then it might be performed because TestStand is keeping the objects in memory.
What you could try is added a couple of steps to the Close DB Handles sequences, on the Open the database using the setting in the DatabaseOptions and the second to close the database. This sequence is called in the Cleanup of the ProcessModel.
Regards
Ray Farmer
03-17-2008 08:33 AM
Hi Ray;
It's not clear to me how to access the Database handles created by the LogResults Method of TSDBLog ( which is called from the Database sequence to log the data) from TestStand.
03-17-2008 02:13 PM
Hi Markus, Hi Ray
Just an addition on Ray's answer. What are you thinking about "rewriting" the model. I think if you put all the DB-SequenceCalls into the loop of an UUT this should work. Place Get Database Options after PreUUT Callback and CloseDBHandles before PostUUT Callback.
Hope this helps.
Greetings
juergen