C
chenhaobo
Unregistered / Unconfirmed
GUEST, unregistred user!
我有一個函數function ExistRecords(AByQuery: TAdoQuery; ASQLs: string): integer;
if ExistRecords(Query,'SELECT 1 FROM [GasFee] WHERE [GafdateTime]= #'+formatdatetime('yyyy/mm/dd hh:mm:ss',strToDateTime(edtGafTime.Text))+'# ') > 0 then
formatdatetime('yyyy/mm/dd hh:mm:ss',strToDateTime(edtGafTime.Text)),這句有問題,調試報錯,我改用:
'...=#'+edtGafdateTime.text+'#'也是同樣不行;(edtGafdateTime.text的值類似 2002/08/25 12:10:12)
if ExistRecords(Query,'SELECT 1 FROM [GasFee] WHERE [GafdateTime]= #'+formatdatetime('yyyy/mm/dd hh:mm:ss',strToDateTime(edtGafTime.Text))+'# ') > 0 then
formatdatetime('yyyy/mm/dd hh:mm:ss',strToDateTime(edtGafTime.Text)),這句有問題,調試報錯,我改用:
'...=#'+edtGafdateTime.text+'#'也是同樣不行;(edtGafdateTime.text的值類似 2002/08/25 12:10:12)