06-21-2006 11:39 AM
06-21-2006 11:57 AM
Your command should be:
"SELECT TEMP2.* FROM TEMP2 WHERE Repair_Code = " + Locals.Repeted_Fault[1]
By enclosing the TestStand expression inside the quote marks, all you are passing is the literal string and not letting the expression be evaluated.
06-22-2006 04:08 AM
06-22-2006 04:35 AM
Hi,
Dont you have to convert your number to a string so that it concat with the rest of the string expression.
eg
"SELECT TEMP2.* FROM TEMP2 WHERE Repair_Code = " + Str(Locals.Reported_Fault[1])
regards
Ray Farmer
06-22-2006 08:46 AM
06-26-2006 03:40 AM
Thanks Ray,
It did worked perfectly. I thought it would give a error regarding data type mismatch !!!
I also have another question here?
When u run a qurey, how everyone normally get that information to a seq. variable. I feel i am doing in a weired way. For example if I need to find count of a Column in a table, I run the qurey and save the information to a new table. Then Select newtable.* and perform read operation. It does work. But I have to create a new table and then delete that at the end
So everytime I need to do count operation I have to create a new table and delete it at the end and this is completely waste of time. But is there any other way to return single value returns like count,max..etc staright to a local variable
Thanks in advance
-mama007
06-28-2006 05:49 AM
07-10-2006 10:56 AM
Hi,
That seems to be a long winded way of obatining the result. Have you looked that the example WritingAndReadingTableData.seq in Teststand\examples\database.
That may help.
Regards
Ray Farmer
06-13-2007 09:39 AM
Dear Dennis,
I have a little different problem than this.... I have a database in which table has a string datatype as a primary key and unique ID... Hence I am trying to run the following Statement:
Select * from BIODATA where BIODATA!ID = "T01.01"
The code works great in LabVIEW but I have trouble in the exacting the same in Teststand.
Attached are the sapshots of my Teststand Steps and Database
I have first opend the database, then opened a SQL statement that has the SQL command i want to pass. Next I have commanded a data operation to extract the current record.
It still is not working!!
06-14-2007 03:26 AM
Hi,
In your Data Operations step your SQL statement should be
"Select * from BIODATA where BIODATA!ID = \"T01.01\""
not
"Select * from BIODATA where BIODATA!ID = T01.01"
Regards
Ray Farmer