02-22-2006 10:32 AM
02-24-2006 09:33 AM
Hi Vasilli,
Although most of the information in this thread is from 2.0, there is a little tidbit that discusses why you can't use ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT line to create the ID tag:
If I remember correctly when using TS 2.0 and its database logging feature, using a SELECT command and using a primary key of type INTEGER AUTO_INCREMENT, the field did not return a value immediately so setting up a relationship between the UUT table and the STEP table was not possible, even when specifying a server cursor.
Instead I used a VARCHAR primary key and used INSERT commands by specifying a GUID as the key value. Below is an old file that I found that I might have used.
You can see this behavior is you look at the default MySQL database logging. You can see the SQL statement for creating the default tables in C:\Program Files\National Instruments\TestStand 3.5\Components\NI\Models\TestStandModels\Database. Since TestStand is taking care of the auto-incrementing, the field itself does not have to be auto-incrementing, it just needs to be a primary key. If you get to this point, you should be able to utilize the MySQL Insert Schema to guide you in your development. However, please let me know if you have additional questions. Thanks and have a good one.