On Mon, Jul 30, 2018 at 2:11 PM Keith Medcalf <kmedc...@dessus.com> wrote:
> > >"SQLITE_ENABLE_LOCKING_STYLE=0","SQLITE_THREADSAFE=0", > >"SQLITE_OMIT_UTF16","SQLITE_ENABLE_COLUMN_METADATA=1", > >"SQLITE_DEFAULT_FOREIGN_KEYS=1" > > >Is there something about the combination of options I've used? > > Do you get different results when using different options? (of course, if > you turn off foreign key enforcement then you will not get errors when you > violate declared foreign key constraints), so other than that obviously? > > It seems to be complaining about a foreign-key reference not existing. > The only option which would affect that is having foreign-keys turned on. > (SQLITE_DEFAULT_FOREIGN_KEYS=1 simply means that you do not need to execute > PRAGMA FOREIGN_KEYS=ON on each connection in order to have foreign keys > enforced -- the default state is ON rather than OFF) > > I removed all ( added pragma foreign_keys=on when opening the connection ), and it worked... readded options one at a time until it failed. OMIT_UTF16 causes it to fail. "SQLITE_OMIT_UTF16" > To understand what foreign-key constraint you are violating one would need > to see the database schema -- however my initial guess would be that that a > option4_name is being checked when you provided an name_id -- that you have > your constraints crossed.... (or collation for text fields set incorrectly, > perhaps) > > > ... select name_id from > >option4_name > >where name like 'System Settings' > > Why are you using "like" instead of "==" ... there is no wildcard in the > string ... > Uhmm good question? I think it can also load names by wildcard. > > --- > The fact that there's a Highway to Hell but only a Stairway to Heaven says > a lot about anticipated traffic volume. > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users