Re: [sqlite] Re: Re: Using Wrong Date Format

2006-08-18 Thread Clark Christensen
Duh!  Nice.  Sorry I missed it.

 -Clark


- Original Message 
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: SQLite 
Sent: Friday, August 18, 2006 11:22:18 AM
Subject: [sqlite] Re: Re: Using Wrong Date Format

Clark Christensen 
wrote:
>> update tableName set
>> DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2);
>
> Am I missing some magic here?  To me, this looks like it'll result in
> MMDD.

substr(DOB,3,4) extracts the day complete with surrounding dashes from 
the original string.

Igor Tandetnik 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Using Wrong Date Format

2006-08-18 Thread Nikki Locke
Clark Christensen wrote:
> > update tableName set
> DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2); 
>  
>  
> Am I
> missing some magic here?  To me, this looks like it'll result in
> MMDD.  Does SQLite convert 
> MMDD date strings? 

Look more carefully. The middle term is of length 4 - it will pick up "-mm-" 
from the middle of the original string.

-- 
Nikki Locke, Trumphurst Ltd.  PC & Unix consultancy & programming
http://www.trumphurst.com/



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: Re: Using Wrong Date Format

2006-08-18 Thread Igor Tandetnik

Clark Christensen 
wrote:

update tableName set
DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2);


Am I missing some magic here?  To me, this looks like it'll result in
MMDD.


substr(DOB,3,4) extracts the day complete with surrounding dashes from 
the original string.


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: Using Wrong Date Format

2006-08-18 Thread Clark Christensen
> update tableName set DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2);

Am I missing some magic here?  To me, this looks like it'll result in MMDD. 
 Does SQLite convert MMDD date strings?



I would've gone with the original -MM-DD date string that Igor posted.

Thanks!

 -Clark


- Original Message 
From: Gerry Snyder <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Friday, August 18, 2006 5:54:22 AM
Subject: Re: [sqlite] Re: Using Wrong Date Format

Igor Tandetnik wrote:
> Eoin Collins <[EMAIL PROTECTED]>
> wrote:
>> The database I'm currently using has a field Date Of Birth, and all
>> enteries in are in dd-mm- format.
>>
>> I need them in -mm-dd format.
>
> update tableName set 
> DOB=substr(DOB,7,4)||'-'||substr(DOB,4,2)||'-'||substr(DOB,1,2);
>
One tiny simplification:  |'-'||substr(DOB,4,2)||'-'|  can be replaced 
by |substr(DOB,3,4)|  making the total command:

update tableName set DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2);


Gerry






-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Using Wrong Date Format

2006-08-18 Thread John Stanton

Sqlite has functions date() and strftime() which can do what you want.

Eoin Collins wrote:

Hi,


The database I'm currently using has a field Date Of Birth, and all enteries
in are in dd-mm- format.

I need them in -mm-dd format.

Can anyone help me with this, please?

Regards,
Eoin



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread Max
Hi,

> > > Please double-check your code.  The error message "library routine
> > > called out of sequence" is what you get when you try to use the
> > > the same database connection from more than one thread at one time.
> > 
> > If I remember correctly, there are two other cases where  "library  
> > routine called out of sequence" would happen:
> > 
> > - the database connection has already been closed
> > - you're trying to use a prepared statement that has already been  
> > finalized
> > 
> > Is this still true?
> > 
> 
> Yes it is.
Thanks a lot - i will check my code again. I am pretty sure the db
connection has not been closed at that time and i dont use a prepared
but finalized statement.


Will report back if i found my bug.
 Max


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] macosx version installation

2006-08-18 Thread drh
Roger Coupal <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm new to SQlite and want to install it on my computer (macosx 10.4).
> However, I'm not familiar with starkits. Could someone explain how we
> "install it" or do not install it and so how do we run it.  I went to the
> starkit website and all I found was how developers can use the formatting
> for their software. Thanks.
> 

SQLite comes preinstalled on Apple computers.
--
D. Richard Hipp   <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] macosx version installation

2006-08-18 Thread Roger Coupal
Hi,
I'm new to SQlite and want to install it on my computer (macosx 10.4).
However, I'm not familiar with starkits. Could someone explain how we
"install it" or do not install it and so how do we run it.  I went to the
starkit website and all I found was how developers can use the formatting
for their software. Thanks.

Roger Coupal
University of Wyoming




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread drh
Tito Ciuro <[EMAIL PROTECTED]> wrote:
> On Aug 18, 2006, at 6:45 AM, [EMAIL PROTECTED] wrote:
> 
> > Please double-check your code.  The error message "library routine
> > called out of sequence" is what you get when you try to use the
> > the same database connection from more than one thread at one time.
> 
> If I remember correctly, there are two other cases where  "library  
> routine called out of sequence" would happen:
> 
> - the database connection has already been closed
> - you're trying to use a prepared statement that has already been  
> finalized
> 
> Is this still true?
> 

Yes it is.

--
D. Richard Hipp   <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread Tito Ciuro

On Aug 18, 2006, at 6:45 AM, [EMAIL PROTECTED] wrote:


Please double-check your code.  The error message "library routine
called out of sequence" is what you get when you try to use the
the same database connection from more than one thread at one time.


If I remember correctly, there are two other cases where  "library  
routine called out of sequence" would happen:


- the database connection has already been closed
- you're trying to use a prepared statement that has already been  
finalized


Is this still true?

Regards,

-- Tito

Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread drh
Max <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am running into problems with sqlite 3.3.6 when trying to read from a
> database with multiple threats in parallel. Each threat has it's own
> connection and i compiled sqlite with --enable-threadsafe. Still it will
> throw exceptions if i don't keep the threats from accessing it in
> parellel. Here's what i get:
> 
> Warn: Caught exception calling DoQuery on 'GaimLog'
> Mono.Data.SqliteClient.SqliteSyntaxException: library routine called out
> of sequence

Please double-check your code.  The error message "library routine
called out of sequence" is what you get when you try to use the
the same database connection from more than one thread at one time.

--
D. Richard Hipp   <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] multi threats parallel reading db

2006-08-18 Thread Max
Hi,

I am running into problems with sqlite 3.3.6 when trying to read from a
database with multiple threats in parallel. Each threat has it's own
connection and i compiled sqlite with --enable-threadsafe. Still it will
throw exceptions if i don't keep the threats from accessing it in
parellel. Here's what i get:

Warn: Caught exception calling DoQuery on 'GaimLog'
Mono.Data.SqliteClient.SqliteSyntaxException: library routine called out
of sequence
in [0x0007f] Mono.Data.SqliteClient.SqliteCommand:GetNextStatement
(IntPtr pzStart, System.IntPtr pzTail, System.IntPtr pStmt)
in [0x0005f]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:481) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (CommandBehavior behavior, 
Boolean want_results, System.Int32 rows_affected)
in [0x5]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:435) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (CommandBehavior behavior)
in [0x2]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:429) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader ()
in [0x8] (at /opt/src/beagle/cur_sql/beagled/SqliteUtils.cs:80)
Beagle.Util.SqliteUtils:ExecuteReaderOrWait
(Mono.Data.SqliteClient.SqliteCommand command)
in [0x00047] (at /opt/src/beagle/cur_sql/beagled/SqlMetadata.cs:478)
Beagle.Daemon.SqlMetadata:GetProperties (System.String uri)
in [0x00010] (at /opt/src/beagle/cur_sql/beagled/LuceneCommon.cs:748)
Beagle.Daemon.LuceneCommon:AddPropertiesToHit (Beagle.Hit hit,
Lucene.Net.Documents.Document doc, Boolean from_primary_index)
in [0x00049] (at /opt/src/beagle/cur_sql/beagled/LuceneCommon.cs:738)
Beagle.Daemon.LuceneCommon:DocumentToHit (Lucene.Net.Documents.Document
doc)
in [0x00227]
(at /opt/src/beagle/cur_sql/beagled/LuceneQueryingDriver.cs:635)
Beagle.Daemon.LuceneQueryingDriver:GenerateQueryResults
(Lucene.Net.Index.IndexReader primary_reader,
Lucene.Net.Search.IndexSearcher primary_searcher,
Lucene.Net.Search.IndexSearcher secondary_searcher,
Beagle.Util.BetterBitArray primary_matches, IQueryResult result,
ICollection query_term_list, Int32 max_results, Beagle.Daemon.UriFilter
uri_filter, Beagle.Daemon.HitFilter hit_filter)
in [0x003a3]
(at /opt/src/beagle/cur_sql/beagled/LuceneQueryingDriver.cs:322)
Beagle.Daemon.LuceneQueryingDriver:DoQuery (Beagle.Query query,
IQueryResult result, ICollection search_subset_uris,
Beagle.Daemon.UriFilter uri_filter, Beagle.Daemon.HitFilter hit_filter)
in [0x0018d] (at /opt/src/beagle/cur_sql/beagled/LuceneQueryable.cs:341)
Beagle.Daemon.LuceneQueryable:DoQuery (Beagle.Query query, IQueryResult
query_result, IQueryableChangeData i_change_data)
in [0x9] (at /opt/src/beagle/cur_sql/beagled/Queryable.cs:74)
Beagle.Daemon.Queryable:DoQuery (Beagle.Query query, IQueryResult
result, IQueryableChangeData change_data)
Warn: Caught exception calling DoQuery on 'EvolutionDataServer'
...

I get these warnings for all the threats running. 

Any idea?

Thanks a lot, 
 Max


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: Using Wrong Date Format

2006-08-18 Thread Gerry Snyder

Igor Tandetnik wrote:

Eoin Collins <[EMAIL PROTECTED]>
wrote:

The database I'm currently using has a field Date Of Birth, and all
enteries in are in dd-mm- format.

I need them in -mm-dd format.


update tableName set 
DOB=substr(DOB,7,4)||'-'||substr(DOB,4,2)||'-'||substr(DOB,1,2);


One tiny simplification:  |'-'||substr(DOB,4,2)||'-'|  can be replaced 
by |substr(DOB,3,4)|  making the total command:


update tableName set DOB=substr(DOB,7,4)||substr(DOB,3,4)||substr(DOB,1,2);


Gerry


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: Using Wrong Date Format

2006-08-18 Thread Igor Tandetnik

Eoin Collins <[EMAIL PROTECTED]>
wrote:

The database I'm currently using has a field Date Of Birth, and all
enteries in are in dd-mm- format.

I need them in -mm-dd format.


update tableName set 
DOB=substr(DOB,7,4)||'-'||substr(DOB,4,2)||'-'||substr(DOB,1,2);


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Using Wrong Date Format

2006-08-18 Thread Eoin Collins

Hi,


The database I'm currently using has a field Date Of Birth, and all enteries
in are in dd-mm- format.

I need them in -mm-dd format.

Can anyone help me with this, please?

Regards,
Eoin
-- 
View this message in context: 
http://www.nabble.com/Using-Wrong-Date-Format-tf2126783.html#a5868252
Sent from the SQLite forum at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] need to form an frame work for database independent API

2006-08-18 Thread Narendran

I wish to form an database independant API for sqlite and BerkeleyDB . I need
to now wht factors  should consider .

i am new to both . I have problems in running an simple program in sqlite .
its say can't find the sqlite3_open(  . If i paste the source code for that
funstion ,it say that some other is so there . please help to resolve this
problem . I am really struck 

thanks in advance .

B. Narendran(  Indian)
-- 
View this message in context: 
http://www.nabble.com/need-to-form-an-frame-work-for-database-independent-API-tf2126447.html#a5867191
Sent from the SQLite forum at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-