Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

Best Pratices for using Firedac

$
0
0

Is there a more secure way to pass parameters to a query?

 

    TFDQuery(Qry).SQL.Clear;
    TFDQuery(Qry).SQL.Add('select * from table where id= :id');
    // option 1
    TFDQuery(Qry).Parambyname('id').AsFloat := valueFloat;
    //or  option 2
   TFDQuery(Qry).Parambyname('id').AsValue := valueFloat;
   // or option 3
   TFDQuery(Qry).ParamByName(‘id’).DataType := ftFloat;
   TFDQuery(Qry).Parambyname('id').AsFloat := valueFloat;
   //or option 4
  // id in bd is Float
  TFDQuery(Qry).Parambyname('id').AsString := valueString;



 Performance question, any of these ways of changing using Firedac?

 

 


Viewing all articles
Browse latest Browse all 3212

Trending Articles



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