delphi dataset clear datetime field -


though can set current date :

dataset['my_date'] := now;

it's unclear me how clear field. tried:

dataset['my_date'] :=''

but wont work. suggestion ? db sqlite.

the entire code how used :

procedure tdatamodule1.sal_twitterbeforepost(dataset: tdataset); begin if sal_twitter.fieldbyname('managed').asboolean = true begin dataset['uredil'] := uniquery4.fieldbyname('sotrpin').asstring; dataset['urejeno_kdaj'] :=now; end else dataset['uredil'] := ''; //dataset.fieldbyname('urejeno_kdaj').clear; <----- not work end; 

the problem is, empty string doesn't represent date field can set.

in particular, tdatasets not treat equivalent setting database field null, people mean when refer "clearing" field.

instead do:

  dataset.fieldbyname('my_date').clear; 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -