In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > But watch this: being clueless (but not stupid) is a gift I have > for troubleshooting. I tried (incorrectly) to insert another record: > > cur.execute("insert into book(title, author, published) values ('Dirk > Gently''s Holistic Detective Agency','Douglas Adams','1987')") > > (u"Dirk Gently's Holistic Detective Agency", u'Douglas Adams', 1987) > (u"Dirk Gently's Holistic Detective Agency", u'Douglas Adams', u'1987') > > Uhh...how can a database have a different field type for each record? > > Simple, without a cast when the table is created, the field type is > whatever you insert into it. That's how the default must work, > each record has a data structure independent of every other record! > > Wow. Just think of the kind of bugs *that* must cause. > > Bugs?
It's not a bug, it's a feature. And answered as third point in the FAQ: http://www.sqlite.org/faq.html#q3 I think your whole experience is based on it. Live with it or use a real RDBMS. If you are so fond of static typing, why are you using Python in the first place? Just see it as consistency -- dynamically typed language → dynamically typed DB columns. ;-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list