07-03-2015 07:46 AM
Hi,
How can I do auto increment in SQL server primary column ID. Actualy I am writing the data into the SQL datbase table using LabVIEW and I wanted to set the auto increment to the primary key column ID. I have three column in TEST_REPORT table i.e Test_ID, Test_No and Test_Result. I wanted to set Test_ID as a primary key and set as a auto increment and write the value for only Test_No and Test_Result column
When ever I am writing data into table the Test_ID is not getting auto incremented. I set that auto increment manualy through SQL server management studio.
Please help me to fix this issue.
07-03-2015 07:53 AM
07-03-2015 08:16 AM
Hello Mike,
We have to write data in all column. How we can ignore the no of data and column match error.
07-03-2015 08:24 AM
07-03-2015 02:18 PM
07-03-2015 02:20 PM
07-06-2015 12:00 AM
Hi Palanivel,
Thanks for the suggestion.
Initially I was using same logic "query for TEST ID at initially" but I have to query data from more than 20 tables and write into it and its taking lots of space and query time.
I am just looking for alternative of this.
Actually I am setting the auto incremnt for TEST ID through the SQL server managemnt studio but when ever I ignore the TEST ID column and write the data in rest column.
I gets the error message "Insert Error: Column name or number of supplied values does not match table definition".
07-06-2015 12:17 AM
07-06-2015 12:29 AM
Dear Dennis,
I have attached the VI.
Also I have another issue, I have to read the data from the SQL table and table contain three column as per attached jpg image.
Data column contain the array value. I have to read the individiual row array value and use it for other calculation.There is no limit of no of row (array value) in Data Column of SQL table . Data available in SQL server shown in attached image.
Thanks,
07-06-2015 01:41 AM