

lookupcombobox點擊選擇close后顯示的數值為notebook001
現在SQL代碼為
elect product_retail_price,(select discount_price from products_discount where discount_start_date < getdate() and discount_end_date > getdate() and product_key='notebook0001') as discount_price from products where product_key='notebook0001'
如何將這段代碼的最后取值賦值給LABEL1
從lookupcombobox1中 提取值后 將notebook001的 price值再賦值給Label 1

代碼該怎么寫啊。。有點亂
uj5u.com熱心網友回復:
with qry5 do beginclose;
sql.clear;
sql.add('select product_retail_price,(select discount_price from products_discount where discount_start_date < getdate() and discount_end_date > getdate() and product_key='''+dblookupcombobox1.keyvalue+''') as discount_price from products where product_key='''++dblookupcombobox1.keyvalue+'''');
open;
label6.caption:=fieldvalues[''discount_price'];
end;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/70480.html
標籤:數據庫相關
下一篇:重賞!求一個游樂場管理系統原始碼
