On Tue, Jun 03, 2008 at 02:51:57PM -0500, Jeff Hamilton scratched on the wall:
> On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
> > OK.  How about:
> >
> >     INSERT INTO foo(bar) VALUES(coalesce(?,'default-value'));
> 
> This approach is working well for us, but as Dennis pointed out it
> won't work for all situations. I wonder if it's worth adding something
> like sqlite3_bind_default_value() to explicitly bind the default
> value, or NULL if no default is specified?

  That, or something like sqlite3_clear_bindings() that actually
  *clears* the bindings (e.g. whatever state they are in just after a
  prepare), and not just sets them to an explicit NULL, as the current
  function does.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to