I have a very simple query:
select count(*) from departamento
How can I get the result of the query with the MyDac component ?
Thanks and sorry
Jalin
Silly question
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
Re: Silly question
try thisjalin wrote:I have a very simple query:
select count(*) from departamento
How can I get the result of the query with the MyDac component ?
Thanks and sorry
Jalin
Code: Select all
//QryCount is a TMyQuery
//nValue is Variable to receive the value os query..
With QryCount do begin
Close;
Sql.Text := 'select count(*) as New from departamento';
Execute;
nValue := FieldByName( 'New' ).AsInteger;
Close;
end;
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil