Fórum Mysql & Delphi #410651
15/12/2011
0
Richard Alexander
Curtir tópico
+ 0Posts
16/12/2011
Itamar Souza
Veja se e isso que precisa!
Label1.Caption := cdsGenerico.FieldByName(coluna).AsString;
Gostei + 0
16/12/2011
Gustavo Bretas
Gostei + 0
18/12/2011
Richard Alexander
Tentei assim, mais da um erro Undeclared identifier: data:
Close;
SQL.Clear;
SQL.Text:=SELECT data FROM user WHERE data>0;
Open;
label2.Caption:= ZQuery1.FieldByName(data).AsString;
Gostei + 0
19/12/2011
Gustavo Bretas
O identificador data não foi declarado, pq vc não insere esse select em tempo de design na query, adiciona os fields, e faz o teste usando a propriedade active?
Gostei + 0
19/12/2011
Richard Alexander
zQuery1: Field not found.
Código:
var
data:string;
---------
--------
--------
begin
Close;
SQL.Clear;
SQL.Text:= SELECT creditos FROM user WHERE creditos>0 ;
Open;
If ZQuery1.IsEmpty then
begin
ShowMessage(Sem creditos!);
end else
begin
label2.Caption:= ZQuery1.FieldByName(creditos).AsString;
Gostei + 0
19/12/2011
Richard Alexander
zQuery1: Field not found.
Código:
var
creditos:string;
---------
--------
--------
begin
Close;
SQL.Clear;
SQL.Text:= SELECT creditos FROM user WHERE creditos>0 ;
Open;
If ZQuery1.IsEmpty then
begin
ShowMessage(Sem creditos!);
end else
begin
label2.Caption:= ZQuery1.FieldByName(creditos).AsString;
Gostei + 0
22/12/2011
Richard Alexander
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)