Page 1 of 1

Prepared:=True

Posted: Tue 19 Apr 2005 18:03
by ChaosTya
Why does this sample code produce 10 parse calls and 10 executions ?
It must produce 1 parse and 10 execution call.

SQLQuery:=TSQLQuery.Create(nil);
SQLQuery.SQL.Text:='select * from test where tmptext=:tmptext';
SQLQuery.Prepared:=True;

for i:=1 to 10 do
begin
SQLQuery.ParamByName('tmptext').AsString:=IntToStr(i);
SQLQuery.Open;
SQLQuery.Close;
end;

Posted: Wed 20 Apr 2005 14:56
by Paul
Borland SQL Express does implement SQLQuery.Prepared property as described in
documentation (try to execute Open/Close and ExecSQL methods with different
values of this property). We plane to add preparation ability in the next
DbxOda build.

Posted: Wed 20 Apr 2005 19:25
by ChaosTya
You ALREADY have the preparation ability - this is the main point of my question.
Now I'm trying to tune the source, and found interesting things.
You prepare SQL berore EVERY execution call, but you don't have to.
Prepare must be called just once before first execution.
When do you plan to submit new version ?

Preparation

Posted: Fri 13 May 2005 00:34
by Jim Scott
Does it support any preparation as of 05.12.05?

It will be very important for us.
Our company considering your product.

When do you plan to support preparation?

Please explain in detail how it works now.

Thanks Jim

Posted: Mon 16 May 2005 11:17
by Paul
The problem is in SQLQuery.Prepared property and how Borland SQL Express
works with it. It is impossibly to make it work without changing sources of
Borland SQL Express. So DbxOda added "Prepared" property of
TCRSQLConnection. This property will be available in DbxOda 2.50.4 in a few
days this week on our site.