![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for RAD Studio XE5 (Delphi Win64) » Using DBISAM » Parameterized Queries |
SELECT Last_Name, First_Name FROM Customer WHERE (Last_Name=:LName) AND (First_Name=:FName)
UPDATE Orders SET ItemsTotal = :TotalParam WHERE (OrderNo = 1014)
begin with MyQuery do begin SQL.Clear; SQL.Add('INSERT INTO Country (Name, Capital, Population)'); SQL.Add('VALUES (:Name, :Capital, :Population)'); Params[0].AsString := 'Lichtenstein'; Params[1].AsString := 'Vaduz'; Params[2].AsInteger := 420000; ExecSQL; end; end;
begin with MyQuery do begin SQL.Clear; SQL.Add('SELECT *'); SQL.Add('FROM Orders'); SQL.Add('WHERE CustID = :CustID'); ParamByName('CustID').AsFloat:=1221; Open; end; end;
begin with MyQuery do begin SQL.Clear; SQL.Add('INSERT INTO Customer (CustNo, Company'); SQL.Add('VALUES (:CustNo, :Company)'); { Manually prepare the query } Prepare; ParamByName('CustNo').AsInteger:=1000; ParamByName('Company').AsString:='Chocolates, Inc.'; ExecSQL; ParamByName('CustNo').AsInteger:=2000; ParamByName('Company').AsString:='Flowers, Inc.'; ExecSQL; ParamByName('CustNo').AsInteger:=3000; ParamByName('Company').AsString:='Candies, Inc.'; ExecSQL; end; end;
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |