Prepared:=True

Prepared:=True

Postby ChaosTya » Tue 19 Apr 2005 18:03

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;
ChaosTya
 

Postby Paul » Wed 20 Apr 2005 14:56

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.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Postby ChaosTya » Wed 20 Apr 2005 19:25

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 ?
ChaosTya
 

Preparation

Postby Jim Scott » Fri 13 May 2005 00:34

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
Jim Scott
 

Postby Paul » Mon 16 May 2005 11:17

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.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dbExpress driver for Oracle