10-28-2015 08:09 PM
I want to save an image file to the results database.
I imagine that this is a common task. I would appreceate if someone could send me a working example.
I created a custom step with a numeric array in the Step.Results folder.
I created a DLL (C#) to read the file contents and return it to TestStand as a byte array.
When the step runs the array is populated - OK so far.
ISSUE#1 - At the end of the sequence the process model hangs a very very long time at the step to write to report. I am using the ATML v6.01 report.
I experimented with tiny image files and it hangs a much shorter time.
The report is not displaying my data. Not sure why it is processing it - taking a long time.
Q1) How do I prevent the report from hanging on my array of data?
ISSUE#2 - the data is not going in the database.
I am using a database very similar to the default NI database - Generic Recordset (NI)
I added fields for our customer but the PROP_RESULTS and the PROP_BINARY part of the schema is identical.
I am getting a record in the PROP_RESULTS for my test step but nothing is going in the PROP_BINARY.
Per the schema, any property object that is an arry type should be added to the PROP_BINARY table.
Below is an image of the properties for this custom step.
Attached is a sample sequence file with the step in use (provides a copy of the custom step type).
The area of concern is moving the data form the step to the database and nto hanginup the local report.
I did not include the DLL that collected the array from the file.
10-29-2015 03:11 PM
Hi eddiek,
An idea that might work for you is to write a LabVIEW vi that will save the images to the database and then call that vi using TestStand. This user was able to create a VI that saved an image to a database:
http://forums.ni.com/t5/LabVIEW/How-can-I-insert-an-image-JPG-into-a-SQL-database/td-p/650392/page/2