FbCommand, queries: dúvida de iniciante
27/10/2006
0
Estou tentando com o FbCommand mas não sei como verificar por propriedade ou função se retornou ou não registros
Rodsrj
Posts
30/10/2006
Wilson Brito
Exemplo:
var command: fbcommand; fb: FbConnection; dr: FbDataReader; begin try try fb := FbConnection1; fb.Open; command:= fbcommand.Create; command.Connection:= Fb; command.CommandText:= ´SELECT * FROM PLANOSAUDE WHERE IDPLANO = ?´; command.Parameters.Add(´@IDPLANO´,DbType.String); command.Parameters[´@IDPLANO´].Value := _IdPlano; dr:= command.ExecuteReader; If dr.Read then begin //Essa linha verifica se encontrou registros IdPlano := dr.Item[´IDPLANO´].ToString; Descricao := dr.Item[´DESCRICAO´].ToString; Status := dr.Item[´STATUS´].ToString; end; dr.Close; command.Dispose; finally Fb.Close; end;
04/04/2011
Nildglan Sousa
pode se usar assim é que postei isso aqui
https://www.devmedia.com.br/forum/viewtopic.asp?id=398651
dê uma olhada
16/04/2013
José
Clique aqui para fazer login e interagir na Comunidade :)