What's is more Fast??,in execution
example 1:
with QueryClients do begin
Close;
SQL.Clear;
SQL.Add( 'Select Name From Clients ' );
SQL.Add( 'Where name like ' + '''' + edit1.text + '%' + '''' );
Prepare;
Open;
end;
example 2:
with QueryClients do begin
Close;
SQL.Clear;
SQL.Add( 'Select Name From Clients ' );
SQL.Add( 'Where name like :pParam' );
ParamByName( 'pParam' ).AsString := Edit1.Text + '%';
Prepare;
Open;
end;
which the execution form fastest??
What's more Fast???
-
swierzbicki
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
-
eduardosic
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
thanks
thanks all.Antaeus wrote:The performance is the same in both cases. But using parameters is more correct.