Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2002, 12:46 PM
jairosanches jairosanches is offline
Junior Member
 
Join Date: Mar 2002
Posts: 11
Default Show label when Add Records in DBF File

Hi,

I have one label in a Form just to show messages for user.
I need to update this label with the number of records of my DataBase, but the Delphi don't show the label.

example:

**** begin of code ***

for I := 1 to TmyQuery.RecordCount do
begin
Table.Last;
Table.Append;
Table.FieldValues['RECORD'] := TmyQuery.FieldValues [id_record'];
Table.Post;
TmyQuery.Next;

//THE PROBLEM IS HERE
mylabel.caption := I;
end;
**** end of code ***

I think that system is busy and don't can show the update label.

How can I show this information for user?

Jairo Sanches.
Reply With Quote
  #2  
Old 08-07-2002, 12:52 PM
kamil kamil is offline
Senior Member
 
Join Date: Jul 2002
Posts: 108
Default RE: Show label when Add Records in DBF File

i think I is an integer.
try this
mylabel.caption := inttostr(I);

Kamil
Reply With Quote
  #3  
Old 08-07-2002, 12:52 PM
lesttat lesttat is offline
Senior Member
 
Join Date: Aug 2001
Posts: 109
Default RE: Show label when Add Records in DBF File

This one way to do it, but it can slow down your process:

<tt>
for I := 1 to TmyQuery.RecordCount do
begin
Table.Last;
Table.Append;
Table.FieldValues['RECORD'] := TmyQuery.FieldValues [id_record'];
Table.Post;
TmyQuery.Next;

//THE PROBLEM IS HERE
mylabel.caption := I;
Application.ProcessMessages;
end;
</tt>

Hope it helps
Reply With Quote
  #4  
Old 08-07-2002, 01:52 PM
HTML HTML is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,977
Default RE: Show label when Add Records in DBF File

Hi : )

You can also refresh the label after setting the caption,

mylabel.caption := I;
mylabel.refresh;
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.