Number parameters should not be enclosed in quote marks, so your query should read br>
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * ');
ADOQuery1.SQL.Add('from lb' );
ADOQuery1.SQL.Add('Where Prov ='''+ edit11.text +'''' );// this field is text
ADOQuery1.SQL.Add('AND Para =''' + edit14.text +'''' );// this field is text
ADOQuery1.SQL.Add('AND Tp =''' + edit15.text + '''' );// this field is text
ADOQuery1.SQL.Add('AND Utm = ' + edit6.text + ' );// this field is number
ADOQuery1.SQL.Add('AND Precio <= ' + edit8.text + ' );// this field is number
Personally I also surrond Text parameters with double quotes to make them easier to read, thus making your SQL
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * ');
ADOQuery1.SQL.Add('from lb' );
ADOQuery1.SQL.Add('Where Prov ="'+ edit11.text +'"' );// this field is text
ADOQuery1.SQL.Add('AND Para ="' + edit14.text +'"' );// this field is text
ADOQuery1.SQL.Add('AND Tp ="' + edit15.text + '"' );// this field is text
ADOQuery1.SQL.Add('AND Utm = ' + edit6.text + ' );// this field is number
ADOQuery1.SQL.Add('AND Precio <= ' + edit8.text + ' );// this field is number
HTH
Paul Bennett
> ----- Original Message -----
> From: "Arsen Khachatryan" <cragreryahoo.com>
> To: delphi-enyahoogroups.com
> Subject: [delphi-en] ADOQuery Problem
> Date: Sat, 17 Jun 2006 01:26:22 -0700 (PDT)
>
>
> Hello who can help me with query.I have a multi search insid DB
> (its in ms access)
> but it gives a error and can't understand what to do
> the code
>
> ADOQuery1.Active :=true;
> ADOQuery1.Close;
> ADOQuery1.SQL.Clear;
> ADOQuery1.SQL.Add('select * ');
> ADOQuery1.SQL.Add('from lb' );
> ADOQuery1.SQL.Add('Where Prov ='''+ edit11.text +'''' );// this field is text
> ADOQuery1.SQL.Add('AND Para =''' + edit14.text +'''' );// this field is text
> ADOQuery1.SQL.Add('AND Tp =''' + edit15.text + '''' );// this field is text
> ADOQuery1.SQL.Add('AND Utm = ''' + edit6.text + '''' );// this field is number
> ADOQuery1.SQL.Add('AND Precio <= ''' + edit8.text + '''' );// this
> field is number
> AOQuery1.Open;
>
> thank you
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger&#8217;s low PC-to-Phone call rates.
>
> [Non-text portions of this message have been removed]
>
Experience is something you don't get until just after you need it.
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com