Re: [sqlite] sqlite3_trace args?

2004-10-06 Thread kervin

Clear's things up.  Thanks!

-
Kervin


Quoting Christian Smith <[EMAIL PROTECTED]>:

> On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote:
>
> >
> >Thanks,
> >
> >Question, why does transactions report the error whilst CREATE
> >on its own returns success but secretly fails?
>
> Because the actual CREATE succeeded. The COMMIT couldn't happen because of
> the ongoing VM from the non-finalized VM, hence the error. But within that
> transaction, the CREATE'd table exists.
>
>
> >
> >Kervin
> >
>
> Christian
>
>
> >
> >Quoting Christian Smith <[EMAIL PROTECTED]>:
> >
> >> On Tue, 5 Oct 2004 [EMAIL PROTECTED] wrote:
> >>
> >> >
> >> >
> >> >Hello,
> >> >
> >> >I am trying debugging my application ( Sqlite reports no errors
> >> >after a CREATE query, but the table does not exist ).
> >>
> >>
> >> Have you done this in a transaction? Check you haven't issued a BEGIN
> >> statement, and/or COMMIT the current transaction.
> >>
> >>
> >> >
> >> >I'd like to use sqlite3_trace() function, but the documentation
> >> >does not have the expected args, neither does the mail archives.
> >> >
> >> >Can someone explain to me briefly what the xTrace() args are at
> >> >runtime, and the args for sqlite3_trace() as well?
> >>
> >>
> >> "Use the source, Luke..."
> >>
> >> xTrace is a callback function called for every SQL block executed. Args to
> >> xTrace are:
> >>void * pArg  : User pointer
> >>const char * sql : SQL being executed
> >>
> >> Args to sqlite3_trace are:
> >>sqlite3 * db : SQLite database
> >>void (*xTrace)(void*,const char*) : Callback function described
> >> above.
> >> void * pArg  : User pointer passed to xTrace
> >>
> >>
> >> >
> >> >Thanks,
> >> >Kervin
> >> >
> >>
> >> --
> >> /"\
> >> \ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
> >>  X   - AGAINST MS ATTACHMENTS
> >> / \
> >>
> >
> >
> >
>
> --
> /"\
> \ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
>  X   - AGAINST MS ATTACHMENTS
> / \
>





Re: [sqlite] sqlite3_trace args?

2004-10-06 Thread Christian Smith
On Wed, 6 Oct 2004 [EMAIL PROTECTED] wrote:

>
>Thanks,
>
>Question, why does transactions report the error whilst CREATE
>on its own returns success but secretly fails?

Because the actual CREATE succeeded. The COMMIT couldn't happen because of
the ongoing VM from the non-finalized VM, hence the error. But within that
transaction, the CREATE'd table exists.


>
>Kervin
>

Christian


>
>Quoting Christian Smith <[EMAIL PROTECTED]>:
>
>> On Tue, 5 Oct 2004 [EMAIL PROTECTED] wrote:
>>
>> >
>> >
>> >Hello,
>> >
>> >I am trying debugging my application ( Sqlite reports no errors
>> >after a CREATE query, but the table does not exist ).
>>
>>
>> Have you done this in a transaction? Check you haven't issued a BEGIN
>> statement, and/or COMMIT the current transaction.
>>
>>
>> >
>> >I'd like to use sqlite3_trace() function, but the documentation
>> >does not have the expected args, neither does the mail archives.
>> >
>> >Can someone explain to me briefly what the xTrace() args are at
>> >runtime, and the args for sqlite3_trace() as well?
>>
>>
>> "Use the source, Luke..."
>>
>> xTrace is a callback function called for every SQL block executed. Args to
>> xTrace are:
>>  void * pArg  : User pointer
>>  const char * sql : SQL being executed
>>
>> Args to sqlite3_trace are:
>>  sqlite3 * db : SQLite database
>>  void (*xTrace)(void*,const char*) : Callback function described
>> above.
>> void * pArg  : User pointer passed to xTrace
>>
>>
>> >
>> >Thanks,
>> >Kervin
>> >
>>
>> --
>> /"\
>> \ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
>>  X   - AGAINST MS ATTACHMENTS
>> / \
>>
>
>
>

-- 
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


Re: [sqlite] sqlite3_trace args?

2004-10-06 Thread kervin

Thanks,

Eventually I did get into the source.  I was just hoping there
was more authorative documenation out there, other than my
interpretation of what the source may be doing.

Transactions solved the problem, thanks.  Funny, it didn't help
till I put the transaction BEGIN, CREATE, and COMMIT statements
in different sqlite3_step() functions.  Then the COMMIT warned
about on ungoing statement.  Turned out my code, after error
conditions, left the function before sqlite3_finalize()

Question, why does transactions report the error whilst CREATE
on its own returns success but secretly fails?

Kervin


Quoting Christian Smith <[EMAIL PROTECTED]>:

> On Tue, 5 Oct 2004 [EMAIL PROTECTED] wrote:
>
> >
> >
> >Hello,
> >
> >I am trying debugging my application ( Sqlite reports no errors
> >after a CREATE query, but the table does not exist ).
>
>
> Have you done this in a transaction? Check you haven't issued a BEGIN
> statement, and/or COMMIT the current transaction.
>
>
> >
> >I'd like to use sqlite3_trace() function, but the documentation
> >does not have the expected args, neither does the mail archives.
> >
> >Can someone explain to me briefly what the xTrace() args are at
> >runtime, and the args for sqlite3_trace() as well?
>
>
> "Use the source, Luke..."
>
> xTrace is a callback function called for every SQL block executed. Args to
> xTrace are:
>   void * pArg  : User pointer
>   const char * sql : SQL being executed
>
> Args to sqlite3_trace are:
>   sqlite3 * db : SQLite database
>   void (*xTrace)(void*,const char*) : Callback function described
> above.
> void * pArg  : User pointer passed to xTrace
>
>
> >
> >Thanks,
> >Kervin
> >
>
> --
> /"\
> \ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
>  X   - AGAINST MS ATTACHMENTS
> / \
>





Re: [sqlite] sqlite3_trace args?

2004-10-06 Thread Christian Smith
On Tue, 5 Oct 2004 [EMAIL PROTECTED] wrote:

>
>
>Hello,
>
>I am trying debugging my application ( Sqlite reports no errors
>after a CREATE query, but the table does not exist ).


Have you done this in a transaction? Check you haven't issued a BEGIN
statement, and/or COMMIT the current transaction.


>
>I'd like to use sqlite3_trace() function, but the documentation
>does not have the expected args, neither does the mail archives.
>
>Can someone explain to me briefly what the xTrace() args are at
>runtime, and the args for sqlite3_trace() as well?


"Use the source, Luke..."

xTrace is a callback function called for every SQL block executed. Args to
xTrace are:
void * pArg  : User pointer
const char * sql : SQL being executed

Args to sqlite3_trace are:
sqlite3 * db : SQLite database
void (*xTrace)(void*,const char*) : Callback function described
above.
void * pArg  : User pointer passed to xTrace


>
>Thanks,
>Kervin
>

-- 
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


[sqlite] sqlite3_trace args?

2004-10-05 Thread kervin


Hello,

I am trying debugging my application ( Sqlite reports no errors
after a CREATE query, but the table does not exist ).

I'd like to use sqlite3_trace() function, but the documentation
does not have the expected args, neither does the mail archives.

Can someone explain to me briefly what the xTrace() args are at
runtime, and the args for sqlite3_trace() as well?

Thanks,
Kervin