Re: Re: [sqlite] C callback that returns numeric data without conversion from text?

2004-07-28 Thread sporkey
On Tue, Jul 27, 2004 at 10:56:09PM -0700, Al Danial wrote: > Great, that fits the bill perfectly, thanks! > > I know you mentioned the code is incomplete but the usage instructions > don't match the executable's behavior: the third command line argument > (the SQL command, or argv[2]) isn't used

Re: Re: [sqlite] C callback that returns numeric data without conversion from text?

2004-07-27 Thread Al Danial
Great, that fits the bill perfectly, thanks! I know you mentioned the code is incomplete but the usage instructions don't match the executable's behavior: the third command line argument (the SQL command, or argv[2]) isn't used by the code. The interactive mode works great though, and

Re: Re: [sqlite] C callback that returns numeric data without conversion from text?

2004-07-27 Thread sporkey
On Mon, Jul 26, 2004 at 08:05:17PM -0700, Al Danial wrote: > Thanks for the clarification. I'll need to study the docs on the three > part method and slowly figure it out. A working example sure would > be nice! -- Al > > On Mon, 26 Jul 2004 11:21:08 +0100 (BST), Christian Smith >

Re: Re: [sqlite] C callback that returns numeric data without conversion from text?

2004-07-26 Thread Al Danial
Thanks for the clarification. I'll need to study the docs on the three part method and slowly figure it out. A working example sure would be nice! -- Al On Mon, 26 Jul 2004 11:21:08 +0100 (BST), Christian Smith <[EMAIL PROTECTED]> wrote: > Typed data retrieval is not supported by

Re: [sqlite] C callback that returns numeric data without conversion from text?

2004-07-26 Thread Christian Smith
Typed data retrieval is not supported by the callback method of execution. You must use the prepare/step/finalize execution method. Check out: http://www.sqlite.org/capi3.html in particular, the sqlite3_step and related functions in section 2.2 "Executing SQL statements." This section gives the

[sqlite] C callback that returns numeric data without conversion from text?

2004-07-25 Thread Al Danial
Since SQLite v2 was 'typeless', one had to call atoi() and atof() on terms of the array *azArg to convert the text strings returned by a query into integers and doubles. As I understand it SQLite v3 stores integers and doubles in their native binary format so one should be able to get at the