[sqlite] TCL Sqlite busy errorcode

2008-12-19 Thread Rick Pritchett
I was reading another site that mentioned that Sqlite busy crashes a TCL proc
instead of returning an error code of 5.  Is this true?

Jim Dodgen replied:

"pretty vague question.

I recommend you supply more details like:

what "other website"

What version of SQLite are they referring to"



Actually I searched and found an example on this in the archives of site here is
the entry.   

Re: [sqlite] Tcl - timeout method

drh
Wed, 16 Aug 2006 10:27:58 -0700

Bud Beacham <[EMAIL PROTECTED]> wrote:
> Yes.  This is a bug, but I have not filed it yet.  The problem is that the 
> the Tcl errorcode command does not return a 5 (SQLITE_BUSY) when the DB is in 
> use.  Instead, Tcl crashes with a "database locked" message.  
>   For example,
>sqlite dbCmd $dataBase
>  dbCmd timeout 3000
>  set qryResult [dbCmd eval $query]
>  set errorCode [dbCmd errorcode]
>  dbCmd close
>
>   So this means that instead of checking the errorcode to try again on a 
> locked DB you need to enclose everything in a "catch" statement, and check 
> the "catch" for an error.
>   

The current behavior is by design.  It is as intented.  It is
the "TCL way" to throw an exception when something goes wrong,
and encountering an SQLITE_BUSY error counts as something
going wrong.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] TCL Sqlite busy errorcode

2008-12-18 Thread Rick Pritchett
I was reading another site that mentioned that Sqlite busy crashes a TCL proc
instead of returning an error code of 5.  Is this true?



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Return first row of database

2008-11-24 Thread Rick Pritchett
I am trying to set my variable to the first row of my database then delete the
row.  Does any one have a good example? 




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-13 Thread Rick Pritchett
I am resending my transactions based on the result code that is returned. 
Should I put the time out command in my loops or once set does time out apply to
each transaction despite the resends?  And does the timeout command apply only
to connecting to the data base or to each request?




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-12 Thread Rick Pritchett

I am resending my transactions based on the result code that is returned. 
Should I put the time out command in my loops or once set does time out apply to
each transaction despite the resends?  



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-10 Thread Rick Pritchett



What is the proper syntax to set a variable to the error code using
errorcode method and TCL.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-10 Thread Rick Pritchett

What is the proper syntax to set a variable to the error code using
errorcode method and TCL.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-10 Thread Rick Pritchett



What is the proper syntax to set a variable to the error code using
errorcode method and TCL.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite-users Digest, Vol 11, Issue 24

2008-11-07 Thread Rick Pritchett
I understand about the different errors that sqlite returns I need to know how
to access them.  And I am curious how sqlite decides what transaction with a
shared lock to process next.  And when using the timeout command does the
transaction continuously try to complete for the time the user specifies  or
does it just try to complete after the specified amount of time?

 
> Message: 6
> Date: Fri, 07 Nov 2008 12:09:05 -0600
> From: John Stanton <[EMAIL PROTECTED]>
> Subject: Re: [sqlite] How does sqlite return the status of the data
>   base?
> To: General Discussion of SQLite Database 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Igor Tandetnik wrote:
> 
> > I'm not sure I understand the question. What precisely do you mean by 
> > "serialized queue"?
> > 
> > Igor Tandetnik
> > 
> Is it a repeated tautology?
> > 
> > 
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 
> 
> 
> Message: 8
> Date: Fri, 7 Nov 2008 20:02:47 GMT
> From: Rick Pritchett <[EMAIL PROTECTED]>
> Subject: Re: [sqlite] How does sqlite return the status of the data
>   base
> To: sqlite-users@sqlite.org
> Message-ID: <[EMAIL PROTECTED]>
> 
> So how does it handle the transactions?  Is it just however it retrieves them 
> or
> just which notices that the DB is available? And how does sql return the state
> its in to the proc?  
> 
> 
> >


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite-users Digest, Vol 11, Issue 24

2008-11-07 Thread Rick Pritchett
I understand about the different errors that sqlite returns I need to know how
to access them.  And I am curious how sqlite decides what transaction with a
shared lock to process next. 

 
> Message: 6
> Date: Fri, 07 Nov 2008 12:09:05 -0600
> From: John Stanton <[EMAIL PROTECTED]>
> Subject: Re: [sqlite] How does sqlite return the status of the data
>   base?
> To: General Discussion of SQLite Database 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Igor Tandetnik wrote:
> 
> > I'm not sure I understand the question. What precisely do you mean by 
> > "serialized queue"?
> > 
> > Igor Tandetnik
> > 
> Is it a repeated tautology?
> > 
> > 
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 
> 
> 
> Message: 8
> Date: Fri, 7 Nov 2008 20:02:47 GMT
> From: Rick Pritchett <[EMAIL PROTECTED]>
> Subject: Re: [sqlite] How does sqlite return the status of the data
>   base
> To: sqlite-users@sqlite.org
> Message-ID: <[EMAIL PROTECTED]>
> 
> So how does it handle the transactions?  Is it just however it retrieves them 
> or
> just which notices that the DB is available? And how does sql return the state
> its in to the proc?  
> 
> 
> >


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How does sqlite return the status of the data base

2008-11-07 Thread Rick Pritchett
So how does it handle the transactions?  Is it just however it retrieves them or
just which notices that the DB is available? And how does sql return the state
its in to the proc?  


> Message: 1
> Date: Fri, 7 Nov 2008 11:02:27 -0600
> From: "Ribeiro, Glauber" <[EMAIL PROTECTED]>
> Subject: Re: [sqlite] How does sqlite return the status of the data
>   base?
> To: "General Discussion of SQLite Database" 
> Message-ID:
>   <[EMAIL PROTECTED]>
>   
> Content-Type: text/plain; charset="us-ascii"
> 
> Do you mean "First come first serve"?
> 
> In that case, I suppose not, since there is no server processed
> involved, to mediate access.
> 
>  
> 
> -Original Message-
> From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 07, 2008 10:44 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How does sqlite return the status of the data
> base?
> 
> Rick Pritchett <[EMAIL PROTECTED]> wrote:
> > Also does sqlite use a serialized queue for
> > processing the
> > transactions?
> 
> I'm not sure I understand the question. What precisely do you mean by 
> "serialized queue"?
> 
> Igor Tandetnik
> 
> 
> 
> 
> 
> 
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How does sqlite return the status of the data base?

2008-11-07 Thread Rick Pritchett
What I would like to do is if the data base returns a busy or locked status is
to set up my proc to retry the write.  Or can I take care of this easier by
setting a long timeout?  And from what I read timeout basically keeps retrying
the write for a specified amount of time.  Is this correct?  Or is it that the
write is retried again that time is reached?  Also does sqlite use a serialized
queue for processing the
transactions?

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] (no subject)

2008-11-07 Thread Rick Pritchett

What I would like to do is if the data base returns a busy or locked status is
to set up my proc to retry the write.  Or can I take care of this easier by
setting a long timeout?  And from what I read timeout basically keeps retrying
the write for a specified amount of time.  Is this correct?  Or is it that the
write is retried again that time is reached?  Also does sqlite use a serialized
queue for processing the transactions?





___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users