0
I am trying to select two columns of a table via sql command by running a precedent.
Code :
String consult = Convert.ToString(command.ExecuteScalar());
Procedure :
BEGIN
SELECT Value, TimeStamp
FROM AVL_Ignition
WHERE TimeStamp = (SELECT MAX(TimeStamp) FROM AVL_Ignition)
IF @@ROWCOUNT = 0
select -1
END
I am only getting the result of Value because it is the first affected. Is there any way to get all the elements results of the query ? I already looked at the methods of the sql command class but found nothing promising.