Home > Back-end >  How from Delphi lookupcombobox values after how to assign a value to the name of the SQL and then ex
How from Delphi lookupcombobox values after how to assign a value to the name of the SQL and then ex

Time:09-23


Lookupcombobox click options after the close of display value of notebook001
Now the SQL code for
Well product_retail_price, (select discount_price from products_discount where discount_start_date & lt; Getdate () and discount_end_date & gt; Getdate () and product_key='notebook0001) as discount_price from products where product_key=' notebook0001 '

How will this code at the end of the value assigned to LABEL1

After extracting value from lookupcombobox1 notebook001 price values and then assigned to Label 1

How to write ah, code, upset

CodePudding user response:

With qry5 do begin
The close;
SQL. The clear;
SQL. Add (' select product_retail_price, (select discount_price from products_discount where discount_start_date & lt; Getdate () and discount_end_date & gt; Getdate () and product_key="' + dblookupcombobox1. Keyvalue + ' ' ') as discount_price from products where product_key=' '+ + dblookupcombobox1. Keyvalue +' ' ' ');
The open;
Label6. Caption:=fieldvalues [' discount_price '];
end;
  • Related