Quantcast
Channel: SCN: Message List - SAP Advantage Database Server
Viewing all articles
Browse latest Browse all 997

Re: SQL Like sentence only works 1 time on ADS12

$
0
0

Hi Amadis,

no, I don't have a solution, it still works bad.

 

But I made some changes in my code to solve that situation:

 

procedure TForm5.Button1Click(Sender: TObject);

begin

  AdsQuery1.Close;

  AdsQuery1.SQL.Clear;

  AdsQuery1.SQL.Add('SELECT * FROM COUNTRY WHERE NAME LIKE ''%'+Edit1.Text+'%'' ');

  AdsQuery1.Open;

end;

 

Don't use the parameter, concatenate the Edit1.Text with the SELECT sentence.

This is not a good solution, it works, but you are in danger of injection sql.

 

Use with your own risk.

Cheers

Eugeni


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>