2007/08/25 09:26

Setting TQuery SQL Statement


This source code sets the SQL String in Query1. As it fits on one line we just use SQL[0].

The SQL statement finds all the fields from the Article table where the user_id field is equal to a varaible Text value dbtUser.Text.

A better way would be to use Parameters in the Query.
      
      
Query1.SQL[0] := 'select * from article where user_id = ' + dbtUser.Text + '';
Query1.Active := True;

 

Another posts included in "Delphi"

How can I modify aliases programmatically ? (0)2007/08/25
Get The Drive Type (0)2007/08/25
How To Get Windows And System Directory (0)2007/08/25
Trackback 4 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/25 08:32 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/28 21:52 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 06:14 delete

    moneyideas

  4. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:41 delete

    moneyideas