Board index » delphi » Re: Sorting

Re: Sorting


2004-07-08 12:02:03 AM
delphi195
Craig
My transaction setting are :
read_committed
rec_version
nowait
and Autostopaction set to saNone.
procedure TForm1.DBGrid1TitleClick(Column: TColumn);
begin
IBDataset.close;
IBDataSet1.SelectSQL.Clear;
IBDataSet1.SelectSQL.Add('Select * From TMAHALLE Order by'+MyField);
IBDataSet1.Open;
end;
When i click on the column , i face with blank form.
Quote
No, unless you've set TIBTransaction.AutoStopAction TRUE. You should
*not* do this unless you are using DataSnap. And if you were using
DataSnap you wouldn't need to re-query in order to change the sort
order.

-Craig

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
blogs.teamb.com/craigstuntz/articles/403.aspx
 
 

Re: Sorting

Feza writes:
Quote
IBDataset.close;
IBDataSet1.SelectSQL.Clear;
These are two different IBDatasets!
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
news server: info.borland.com/newsgroups/guide.html
 

Re: Sorting

Quote
>IBDataset.close;
>IBDataSet1.SelectSQL.Clear;

These are two different IBDatasets!

it is IBDataset1.Close.i have written by mistake.Sorry about that.Why can't
i sort records on DBGrid? i mean, if my dataset doesn't let me to sort
records on dbgrid.i could use its method.
 

Re: Sorting

Feza writes:
Quote
it is IBDataset1.Close.i have written by mistake.Sorry about that.Why
can't i sort records on DBGrid?
Because TDBGrid doesn't offer that feature.
The Developer Express grids do, and it is a bit quirky. The dataset
order is no longer the same as the grid order, for example.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
 

Re: Sorting

Quote
The Developer Express grids do, and it is a bit quirky. The dataset
order is no longer the same as the grid order, for example.
Yes , in my opinion, that is what standart grid should offer...Unfortunately
, i do not use Developer Express grid...and still looking for answer what i
can do.i have been nearly hours..still trying :(
Thanks
Feza
 

Re: Sorting

Feza writes:
Quote
Yes , in my opinion, that is what standart grid should
offer...Unfortunately , i do not use Developer Express grid...and
still looking for answer what i can do.i have been nearly
hours..still trying :(
If the grid is empty, either your query returned no records or it
isn't open. Should be pretty easy to figure out which is the case.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
qc.borland.com -- Vote for important issues