Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 7:08pm, Tim Streater wrote: > Yes. I'm concluding that there's something fishy with the way my > data-gathering page is operating. I've recently added "use strict"; to my > javascript and that may be exposing something. My web apps involve a hand-off

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 18:38, Simon Slavin wrote: > On 17 Feb 2014, at 4:57pm, Tim Streater wrote: > >> Thanks. I should perhaps have made it clearer that I'm looking at an issue a >> user has. The application gathers some data from the user via a set of

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 4:57pm, Tim Streater wrote: > Thanks. I should perhaps have made it clearer that I'm looking at an issue a > user has. The application gathers some data from the user via a set of fields > they complete in a browser window, which data is then gathered

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread RSmith
Forgot to add: My headache was essentially UTF-8 encoding, but the same would happen with others, though invalid chars do not really exist in UTF7 or ANSI, but in the higher level encodings they are plentiful. On 2014/02/17 19:35, RSmith wrote: Yeah, I too have had real problems with this -

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread RSmith
On 2014/02/17 19:01, Stephan Beal wrote: On Mon, Feb 17, 2014 at 5:57 PM, Tim Streater wrote: complete in a browser window, which data is then gathered up and sent using ajax to be processed by a PHP script, which writes it to an sqlite db. The user complains that some

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 17:01, Stephan Beal wrote: > FWIW, i have seen a similar problem in a legacy app which uses latin1 > encoding in the DB. Latin1 doesn't always survive round-trip through PHP's > JSON APIs. My case was similar to yours, and we eventually determined that >

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Stephan Beal
On Mon, Feb 17, 2014 at 5:57 PM, Tim Streater wrote: > complete in a browser window, which data is then gathered up and sent > using ajax to be processed by a PHP script, which writes it to an sqlite > db. The user complains that some of this data doesn't make it, so I

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 14:10, Simon Slavin wrote: > On 17 Feb 2014, at 11:37am, Tim Streater wrote: > >> If I have a text column defined as it might be as MYCOL TEXT (that is with no >> default value), is there a way to distinguish in some row or other

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Clemens Ladisch
Tim Streater wrote: > If I have a text column defined as it might be as MYCOL TEXT (that is > with no default value) All columns have a default value. With no _explicitly_ specified default value, the column's default value is NULL. > is there a way to distinguish ... between ... no data ...

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Simon Slavin
On 17 Feb 2014, at 11:37am, Tim Streater wrote: > If I have a text column defined as it might be as MYCOL TEXT (that is with no > default value), is there a way to distinguish in some row or other between a > column into which no data has ever been entered, and a column

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Donald Griggs
On Mon, Feb 17, 2014 at 6:37 AM, Tim Streater wrote: > If I have a text column defined as it might be as MYCOL TEXT (that is with > no default value), is there a way to distinguish in some row or other > between a column into which no data has ever been entered, and a