Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
How to insert a blank date into an update query |
Tue, Nov 27 2012 7:46 PM | Permanent Link |
Paul Coshott | Hi,
I am using an update query with params to set the values. One of the fields is a date. What does the date param need to be set to for a blank date? The update query is : Update Members Set MemberName = :MName, JoinDate = :JDate Where MemberId = :MId My code is : with qMemberUpdate do begin ParamByName('MId').AsInteger := intMemId; ParamByName('MName').AsString := edtMemberName.Text; if edtJoinDate.Text = '' then begin ParamByName('JDate').AsDate := ********************* <-- what should this be for a blank date end else begin ParamByName('JDate').AsDate := edtJoinDate.Date; end; Thanks for any help, Paul |
Wed, Nov 28 2012 5:33 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Paul
I think its > if edtJoinDate.Text = '' then begin > ParamByName('JDate').Clear <<<<<<<<<<<<<<<<< >this be for a blank date > end else begin > ParamByName('JDate').AsDate := edtJoinDate.Date; > end; Not sure since its a long time ago I did something like this Roy Lambert [Team Elevate] |
Wed, Nov 28 2012 9:19 PM | Permanent Link |
Paul Coshott | Hi Roy,
You got it! Works perfectly. Thanks. Paul "Roy Lambert" wrote in message news:A8005228-9D54-4137-9619-C095210B265E@news.elevatesoft.com... Paul I think its > if edtJoinDate.Text = '' then begin > ParamByName('JDate').Clear <<<<<<<<<<<<<<<<< >this be for a blank date > end else begin > ParamByName('JDate').AsDate := edtJoinDate.Date; > end; Not sure since its a long time ago I did something like this Roy Lambert [Team Elevate] |
This web page was last updated on Thursday, March 28, 2024 at 08:36 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |