selas
asked on
Progressbar while opening DB
I want to putt ProgressBar while opening a DB.
How to make progressar move then opening Form8 with dbgrid
database size about 20 MB
How to make progressar move then opening Form8 with dbgrid
database size about 20 MB
ASKER
And then how to show it?
-- how to show it?
you can use a TADOCOnnection component (ADO pallete) to create the conecttion with your database...then you can use a TADOQuery (conecction = TADOCOnnection) and write some query like this... 'select * from my_table' then add a datasource (Dataset = TADOQUery) and dbgrid ...that's it...
you can use a TADOCOnnection component (ADO pallete) to create the conecttion with your database...then you can use a TADOQuery (conecction = TADOCOnnection) and write some query like this... 'select * from my_table' then add a datasource (Dataset = TADOQUery) and dbgrid ...that's it...
ASKER
I do the same :/
But how to show progressbar (moving)
then getting about 20 Mb of information?
But how to show progressbar (moving)
then getting about 20 Mb of information?
1. you must set CursorLocation = clUseClient for your TADOQuery
2. you must set CursorType = ctStatic
3. you must include the eoAsyncFetchNonBlocking flag in ExecuteOptions
property
4. write next code in OnFetchProgress event:
procedure TForm1.ADOQuery1FetchProgr ess(DataSe t: TCustomADODataSet;
Progress, MaxProgress: Integer; var EventStatus: TEventStatus);
begin
Progressbar1.Max := MaxProgress;
Progressbar1.Position := Progress;
end
2. you must set CursorType = ctStatic
3. you must include the eoAsyncFetchNonBlocking flag in ExecuteOptions
property
4. write next code in OnFetchProgress event:
procedure TForm1.ADOQuery1FetchProgr
Progress, MaxProgress: Integer; var EventStatus: TEventStatus);
begin
Progressbar1.Max := MaxProgress;
Progressbar1.Position := Progress;
end
ASKER
maybe there is other way?
because in this way progress bar moves only in the end and very fast
because in this way progress bar moves only in the end and very fast
ASKER
How to move progressbar in splashscreen?
then opening form with DbGrid?
then opening form with DbGrid?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If i use fetch process it work, but not good
then i use this query: Select '* from klientai order by id
it moves ok!
but if i use: Select id, slapyvardis, lankomumas, zaidzia, sum(inesta), sum(atiduota), sum(balansas), (sum(inesta) * 0.005 + sum(atiduota) * 0.0025) as bonusai, laikas, ivede, krupje from esantys where laikas > '+QuotedStr(DateToStr(Now( )))+' group by id order by laikas desc
it moves only on last of ten second
How to solve it?
then i use this query: Select '* from klientai order by id
it moves ok!
but if i use: Select id, slapyvardis, lankomumas, zaidzia, sum(inesta), sum(atiduota), sum(balansas), (sum(inesta) * 0.005 + sum(atiduota) * 0.0025) as bonusai, laikas, ivede, krupje from esantys where laikas > '+QuotedStr(DateToStr(Now(
it moves only on last of ten second
How to solve it?
It makes no sens for any user.
You should use query to select needed information.