SQLite Not Null - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQLite Not Null (
/showthread.php?tid=561038)
SQLite Not Null -
vannesenn - 31.01.2015
Hi guys,
I've got problem with SQLite field(column). So, in already existed SQLite table I added field and I've set it to INTEGER, default value is 0 and when I want to check NOT NULL check box, I got this
''There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table dana frist.''
So guys, I don't know where is a problem. Also, I've got some setting under table setting, without rowid, but when I want to check checkbox for that setting I've got this
'' Okease add a field which meets the following criteria before setting the without rowid flag:
- Primary key set
- Auto incremenct disabled
- Type INTEGER''
On that table where I added field I didn't checked that setting(without rowid). Thanks
Re: SQLite Not Null -
vannesenn - 01.02.2015
Somebody?
Re: SQLite Not Null -
Calgon - 01.02.2015
not sure I fully understand the problem, but 0 cannot equal to NULL because it (0) is a valid value. You should run a check to see if the value is 0, rather than NULL for your integer field.
Re: SQLite Not Null -
vannesenn - 01.02.2015
Thanks, I must set default to 10. But I don't understand when I must use Not Null