06-29-2016 03:59 AM
Hello, so I have a table with 15 Columns, and my 1st Column is complete automatically by the Database. How can I say to the program "Don't touch to the 1st column" or something like that? Blank or Void are not ok. probably need something that never exec without a "start" value... I don't know, any help would be great, thanks.
Solved! Go to Solution.
06-29-2016 04:46 AM
06-29-2016 04:57 AM
Hello,
Thanks for your answer, so LabVIEW can not interact only with the 2nd to 15th column? It will everytime interact with every columns in the table? So if my company want to add so field indepently of the tests generate by LabVIEW it is not possible?
The problem is that my company want a Table with: Id, Computername, Username, Measure Name, Measure Value, Measure Unit...
And Id is a default value that they want to see in the table... I can not
Here is an excel picture to see you how will look the table that I have to create. And the Id column is, has a default value but need to be in the table. Is it possible with LabVIEW?
06-29-2016 05:14 AM - edited 06-29-2016 05:16 AM
LabVIEW will interact with whatever columns you tell it to. Don't tell it to insert data into the first column.
This isn't a LabVIEW question, it's very basic SQL. You will need to generate an insert statement like:
insert into myTable
(AssembyPN, SerialNumber, ComputerName, the remaining 11 column names)
values
(1234,'ABC00001','toto_pc', the remaining 11 column values)
;
Id is not included in the column list so it is not effected.
Mike...
PS: The company's database design stinks on ice, but that is a different conversation...
06-29-2016 05:49 AM
Ok thanks for your answer, now I understand where is the problem but I am looking for a last question:
If I do:
INSERT INTO TESTS.STEP1.POWERSUPPLIES(The 14 last column names)
VALUES(' ',' ',' ',' ',' ')
Is LabVIEW going to erase spaces and then write the right values into the table?
I am sorry, I am in internship and I never worked on Databases, only on LabVIEW so that's not me who do the SQL code...
If LabVIEW is going to erase spaces and then write the right values in the table, then I will ask them to add that 2 lines.
06-29-2016 05:50 AM
Also, is there anyway to insert that 2 lines with Excel Query Editor? Then I could make it alone...
06-29-2016 05:59 AM
06-29-2016 06:46 AM
Ok, thanks for your answers. It will probably work when it will be fixed. We will try like it.
Thanks for all,
Robin.
06-30-2016 04:53 AM
Hello,
Here is a screenshot, but the problem stay the same...
Have you some good document to learn SQL Server code to communicate with LabVIEW? The guys that have to do it are busy so I am trying to do it my self...
06-30-2016 07:41 AM