Subject | Re: [IBO] fastest IB_Cursor... how??? |
---|---|
Author | Carlos GarcĂa Trujillo |
Post date | 2006-09-06T18:10:06Z |
Thanx Dany...
I was digging in the source code of IBO, and found that Jason use
TIB_SchemaCursor in those queries...
should i use TIB_SchemaCursor for my query instead of TIB_Cursor???
what are the differences???
here i'll show one of my procedures:
function TDM_Conexion.ObtenCampo(S: string): TIB_Column;
begin
with IB_Cursor1 do
begin
SQL.Text := S;
ReadOnly := True;
BeginBusy(true);
try
First;
Result := Fields[0];
finally
EndBusy;
end;
end;
end;
this function returns the pointer to a TIB_Column that should be the
first field in the query passed as parameter... useful to make
Count's and stuff like that where just one value is requested to the
DB.
are there anything that could be perfectible??? i'm getting good
results of speed as is... but just wondering about if i'm missing
something.
Cheers.
I was digging in the source code of IBO, and found that Jason use
TIB_SchemaCursor in those queries...
should i use TIB_SchemaCursor for my query instead of TIB_Cursor???
what are the differences???
here i'll show one of my procedures:
function TDM_Conexion.ObtenCampo(S: string): TIB_Column;
begin
with IB_Cursor1 do
begin
SQL.Text := S;
ReadOnly := True;
BeginBusy(true);
try
First;
Result := Fields[0];
finally
EndBusy;
end;
end;
end;
this function returns the pointer to a TIB_Column that should be the
first field in the query passed as parameter... useful to make
Count's and stuff like that where just one value is requested to the
DB.
are there anything that could be perfectible??? i'm getting good
results of speed as is... but just wondering about if i'm missing
something.
Cheers.
> If you have the source code you can check how Jason did it. Thereads in
> SchemaCache.pas (if that is the name, do a search) *should*logically be
> optimised. But I'm not a 100% that that is a fact. Looks like it,though.
>
> HTH,
>
> /Dany
>