Réutilisation d'un TSQLQuery ?
Bonjour
Voila, dans un même traitement, j'utilise d'abord un TSQLQuery pour obtenir un résultat, puis je veux utiliser le même TSQLQuery pour obtenir un second résultat, mais là Lazarus plante me disant que je ne peux pas le faire !
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
sql_Local.SQL.Text:='DESCRIBE '+stl_tblNom;
Try
sql_Local.ExecSQL;
sg_Tables.Cells[2,j] := IntToStr( sql_Local.RecordCount);
Except
On E:Exception do ShowMessage( 'Erreur Describe : '+E.Message);
End;
sql_local.close;
sql_local.sql.text := 'select count(*) from '+stl_tblNom;
try
//CELUI-LA PLANTE !
sql_Local.ExecSQL;
sg_Tables.Cells[3,j]:=sql_Local.Fields[0].AsString;
Except
On E:Exception do showmessage( 'Erreur Count : '+E.Message);
End;
sql_local.close; |
Que puis-je faire ? Merci !