On Tue, 2007-05-15 at 17:24 -0700, Mike Johnston wrote: > Absolutely but it seems like duplicate effort if sqlite already has the info. > Any guess if this is a big deal to put into the source?
Not a big deal at all. But there's no real advantage to putting this in the core. And it would add a few bytes to the footprint. A wrapper can do just as good a job. In case you were wondering: As long as you never call sqlite3_column_name16(), the pointers returned by sqlite3_column_name() are safe to use for the lifetime of the statement. Dan. > Igor Tandetnik <[EMAIL PROTECTED]> wrote: Mike Johnston > wrote: > > While using sqlite3_step(), is there a clean easy way to retrieve the > > data by column name instead of by ordinal? I know I can convert an > > ordinal to a column name but not the other way around. > > You can enumerate all columns, retrieve the name of each, and find the > one you want. You only need to do this once after the statement is > prepared: after that, you can use the ordinal you've found. > > Igor Tandetnik > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > > > > --------------------------------- > Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, > when. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------