2013/9/11 LacaK <la...@zoznam.sk> > ** > silvioprog wrote / napísal(a): Now doing more tests. I see, that in > pgAdmin when I use right click on table and use "View Data" then '' (two > single quotes) are shown in TEXT column, but when I use SQL and type: > select * from <table name> then empty fields are shown ... so it seems to > me, that bug is in pgAdmin, does not ? > -Laco. >
The bug is in FCL. Please see the steps in my comparison: 1. first I inserted a record via pgAdmin: insert into test (id, fieldtext) values (1, null); 2. after, I executed this demo: http://pastebin.com/HS8DZkDV; 3. finally, I made this selection in pgAdmin: select * from test where fieldtext is null; And the result is: id | fieldtext ----------------- 1 | But, when I select so: select * from test where fieldtext = '' The result is: id | fieldtext ----------------- 2 | Then SQLdb is saving an empty string instead of null. :o I tried it: q.FieldByName('fieldtext').Value := Null; Instead of: q.FieldByName('fieldtext').Clear; Same result, it is saving an empty string instead of null. -- Silvio Clécio My public projects - github.com/silvioprog
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal