Subject | Re: [IBO] Load Ordering defaults |
---|---|
Author | Koby Peleg Hen |
Post date | 2003-01-01T10:23:19Z |
Lucas Franzen wrote:
I did the req. settint and it's working fine.
I just wonder why it's not in the property list?
--
Thank you for your time
Koby Peleg Hen
koby@...
>Thank you very very much Luc
> Koby Peleg Hen schrieb:
>
>>Hello all
>>Can some one please tell me
>>how can i preform the same code in my application as the "Load ordering
>>default" that valid inside delphi when you click the right click on
>>TIB_query in the ordering tab
>
>
> Open the IBO_SQL.dpr project and have a look at the procedure (around
> line 2255) where it is done in the query editor.
>
> procedure TfrmQuery.LoadOrderingDefaults1Click(Sender: TObject);
> var
> iter, iter2, inspos: Integer;
> s, fn: String;
> sl_oi, sl_sl: TStringList;
> ibc: TIB_Column;
> qualified: Boolean;
> begin
> inherited;
> With qrQuery do
> begin
> meOrderingItems.Clear;
> Prepare;
> qualified := Fields.RelationCount > 1;
> sl_oi := TStringList.Create;
> sl_sl := TStringList.Create;
> With sl_oi do
> try
> for iter := 0 to Fields.ColumnCount - 1 do
> begin
> ibc := Fields[iter];
> if ibc.IsCalculated or ibc.IsBlob or not ibc.Visible
> then continue;
> if ibc.RelName = EmptyStr
> then fn := IntToStr(ibc.FieldNo)
> else if qualified
> then fn := ibc.FullFieldName + ';' + ibc.FullFieldName + ' DESC'
> else fn := ibc.FieldName + ';' + ibc.FieldName + ' DESC';
> s := AnsiUpperCase(stLitCriteria(ibc.FieldName));
> for iter2 := 1 to Length(s) do
> if not (s[iter2] in ['0'..'9', 'A'..'Z']) then
> s[iter2] := '_';
> //inspos := -1;
> if Values[s] = EmptyStr then
> inspos := Add(s + '=' + fn)
> else
> begin
> iter2 := 1;
> while Values[s + IntToStr(iter2)] <> EmptyStr do
> Inc(iter2);
> inspos := Add(s + IntToStr(iter2) + '=' + fn)
> end;
> // We cannot search in server-side expressions or aggregate
> columns
> if not ibc.PreventSearching and (ibc.RelName <> EmptyStr) then
> begin
> {if qualified
> then sl_sl.Add(ibc.FullFieldName + '=' + Names[inspos])
> else sl_sl.Add(ibc.FieldName + '=' + Names[inspos])}
> sl_sl.Add(Names[inspos] + '=' + Names[inspos]);
> end
> end;
> meOrderingItems.Lines.Assign(sl_oi);
> meOrderingLinks.Lines.BeginUpdate;
> try
> meOrderingLinks.Clear;
> for iter := 0 to Count - 1 do
> meOrderingLinks.Lines.Add(Names[iter] + '=' + IntToStr(iter +
> 1));
> finally
> meOrderingLinks.Lines.EndUpdate;
> end;
> meSearchingLinks.Lines.Assign(sl_sl);
> finally
> Free;
> sl_sl.Free;
> end; // with sl_oi
> end;
> end;
>
>
> Luc.
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
I did the req. settint and it's working fine.
I just wonder why it's not in the property list?
--
Thank you for your time
Koby Peleg Hen
koby@...