This would be the code to retrieve the number of records:
Code: Select all
cStr: = 'select nCodInm from' + form1.cDataBaseName + '. Dbo.Vista_pisos Where NhaB> =' + int (tbHabit.Value) .ToString;
uQPisos.Close;
uQPisos.SQL.Text: = cStr; uQPisos.Open;
lbNumReg.Text: = 'Total Pisos: = uQPisos.RecordCount. ToString;Code: Select all
cStr: = 'SELECT * FROM' + form1.cDataBaseName + '. dbo.Vista_pisos Where NhaB> =' + int (tbHabit.Value) .ToString;
uQPisos.Close;
uQpisos.SQL.Text: = cStr;
ClientModule1.uQPisos.Open;In the second case I need all fields to show (select * from ...)
The problem is that the query is not updated when I try to retrieve all fields and I get a single field (nCodInm).
I can use two differents tUniQuery objects for resolve it but I don't think that be a good solution.
Anyone can tell me why this happens and what would be the right way to do it ??
Thank you