Re: [sqlite] UPDATE TRIGGER not called on INSERT OR REPLACE statement

2008-06-16 Thread Bharath Booshan L
hanks Igor for your valuable time, Bharath On 6/16/08 6:39 PM, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: > "Bharath Booshan L" > <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] >> IF INSERT OR REPLACE statement performs REPLACE oper

[sqlite] UPDATE TRIGGER not called on INSERT OR REPLACE statement

2008-06-16 Thread Bharath Booshan L
Hello Sqlite users, experts, I am in a state of confusion and I request you to help me out please. Can "INSERT OR REPLACE" trigger if actual operation performed is REPLACE? Say , For example, if I have 2 triggers on table T1, one trigger, say insert_trigger, is set to trigger after INSERT,

Re: [sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Bharath Booshan L
Thanks for you valuable time, Bharath On 6/6/08 5:33 PM, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: > "Bharath Booshan L" > <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] >> 1. Can I use sqlite3_prepare_v2 in Version 3.1.3? > >

[sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Bharath Booshan L
Hello SQLite users, I have two questions, could anyone please help me out. 1. Can I use sqlite3_prepare_v2 in Version 3.1.3? 2. How do I bind date values using prepare/bind methods? Eg: INSERT INTO TABLE Info(Name,DOB) values('XYZ',julianday('1984-03-03')); For above example I can write a

[sqlite] Attempt to read a write-only database error from BEGIN TRANSACTION

2008-03-27 Thread Bharath Booshan L
Hello list, I am using SQLite version 3.4.0 and facing some strange problem My database file is located in a Read-Write folder and I can perform insert/update/select from SQLite Shell. But I encountered error number 8 "attempt to write a read-only database file". The strange thing is, I get

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-18 Thread Bharath Booshan L
> Do you test for SQLITE_BUSY, when you perform BEGIN IMMEDIATE ? > Yes, I do. > Yes a process that is reading will continue to read. Once it completes if > anothre process is waiting to write then the additional read locks will not be > granted. This is to prevent writer starvation. > > How

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-18 Thread Bharath Booshan L
> Where do the and come from? > Where do the and come from? > Where does all the data to create the new records come from? You say > Process A only has a FilePath as input. > Where do the and come from? > All the Information written into the database is extracted from the file itself.

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Bharath Booshan L
Ken, Thanks for reply, > I would start with APP A to determine after processing that the data that you > asked to be loaded is actually loaded. If it does not, then look into app A. > I think I need to add some more information here. App B will be in running state, and whenever a write

Re: [sqlite] mail forwarding loop?

2008-03-17 Thread Bharath Booshan L
Same here On 3/14/08 7:17 PM, "P Kishor" <[EMAIL PROTECTED]> wrote: > I have now twice gotten the following message. What gives? > > > This is the mail system at host sqlite.org. > > I'm sorry to have to inform you that your message could not > be delivered to one or more recipients. It's

[sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Bharath Booshan L
Hello List, Here I am stuck with some Database Table corrupt problem and I would request the people on this list to help me out as I am unable to figure out the cause for this problem. Previously I was using SQLite 3.1.3 and now since our application should support Mac OS Leapord, it uses

[sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Bharath Booshan L
Hello List, Here I am stuck with some Database Table corrupt problem and I would request the people on this list to help me out as I am unable to figure out the cause for this problem. Previously I was using SQLite 3.1.3 and now since our application should support Mac OS Leapord, it uses

[sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-17 Thread Bharath Booshan L
Hello List, Here I am stuck with some Database Table corrupt problem and I would request the people on this list to help me out as I am unable to figure out the cause for this problem. Previously I was using SQLite 3.1.3 and now since our application should support Mac OS Leapord, it uses

Re: [sqlite] Rowid After Sorting

2008-03-14 Thread Bharath Booshan L
> But I need my rowid to be chaged as follows. > > > > Rowid Id Name > > > > 1 4 aaa > > 2 3 bbb > > 3 2 xxx > > 4 1 zzz If you are looking Rowid to contain serial numbers every time then you can query for only

Re: [sqlite] FW: Query to Find number of distinct records

2008-02-27 Thread Bharath Booshan L
; support for count(distinct) has been added in 3.2.6 > your version is certainly < 3.2.6 (sqlite -version) > > Bharath Booshan L wrote: >> ------ Forwarded Message >> From: Bharath Booshan L <[EMAIL PROTECTED]> >> Date: Wed, 27 Feb 2008 14:32:14 +0530 >> To:

[sqlite] FW: Query to Find number of distinct records

2008-02-27 Thread Bharath Booshan L
-- Forwarded Message From: Bharath Booshan L <[EMAIL PROTECTED]> Date: Wed, 27 Feb 2008 14:32:14 +0530 To: Eugene Wee <[EMAIL PROTECTED]> Conversation: [sqlite] Query to Find number of distinct records Subject: Re: [sqlite] Query to Find number of distinct records I was o

Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
? On 2/27/08 12:34 PM, "Bharath Booshan L" <[EMAIL PROTECTED]> wrote: > Hello All, > > This might be simple question, but am not getting the SQL query right for > my problem. > > > For eg, consider following table > > NonUniqueNo Name > -

Re: [sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
nt from TableA > > Shibu Narayanan > Consultant, PrimeSourcing Division, Investment Banking Group > Tel.Office: 91-80-2208-6270 or 91-80-6659-6270 > e-mail: [EMAIL PROTECTED] > The answer is 42. > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROT

[sqlite] Query to Find number of distinct records

2008-02-26 Thread Bharath Booshan L
Hello All, This might be simple question, but am not getting the SQL query right for my problem. For eg, consider following table NonUniqueNo Name - 23 A 23 B 24 C 25 A 23 E How can I find the number of people for

Re: [sqlite] Getting the no of rows using count(*)

2008-01-30 Thread Bharath Booshan L
Hello Kirrthana, > should i use prepare and step in this case and where the result of the query > will be stored on executing my c code. retValue = sqlite3_prepare( dataBaseConnection ,sqlQuery,-1, ,0); if( retValue != SQLITE_BUSY && (retValue = sqlite3_step( ppStmt ) == SQLITE_ROW ) {

Re: [sqlite] How to specify regular expression in a query? ( Indexes usage issue)

2008-01-29 Thread Bharath Booshan L
Thanks kjh for your valuable inputs, > If you use US ASCII, there is a collation (COLLATE NOCASE) > that could handle this for you. I am using Unicode characters. > There is also a discussion of the REGEXP Function on that page and why your > app threw an error when you tried to invoke a

Re: [sqlite] How to specify regular expression in a query?

2008-01-28 Thread Bharath Booshan L
Hello experts, How can I instruct GLOB function to perform case-insensitive search similar to LIKE. Can I? -- Bharath On 1/30/08 10:30 AM, "Bharath Booshan L" <[EMAIL PROTECTED]> wrote: > Thanks for the inputs experts, > > I am using SQLite 3.4.0 on Mac OS X Leapord

Re: [sqlite] How to specify regular expression in a query?

2008-01-28 Thread Bharath Booshan L
Thanks for the inputs experts, I am using SQLite 3.4.0 on Mac OS X Leapord, and using regexp in my query reports an error SQL error: no such function: regexp I tried to use the query using GLOB and another query which separates FilePath into Dirpath and FileName and uses LIKE comparison. Both

Re: [sqlite] How to specify regular expression in a query?

2008-01-27 Thread Bharath Booshan L
ECTED]> wrote: > > > On 01/26/2008 02:40 AM, Bharath Booshan L wrote: >> >> Hello list, >> >> I have to perform a search something similar to this >> >> ID FilePath >>1 /Volumes/Backup/MyMovies/MyMovie.mp4 >>2

Re: [sqlite] How to specify regular expression in a query?

2008-01-27 Thread Bharath Booshan L
Thanks Ralf, >select * from t where filepath regexp '/MyMovie(\.[^\.]+)*$'; Will this query use index, if we had one, on filepath? Regards, Bharath On 1/25/08 5:22 PM, "Ralf Junker" <[EMAIL PROTECTED]> wrote: > Hello Bharath Booshan L, > > yes, with SQLiteSp

[sqlite] How to specify regular expression in a query?

2008-01-25 Thread Bharath Booshan L
Hello list, I have to perform a search something similar to this ID FilePath 1 /Volumes/Backup/MyMovies/MyMovie.mp4 2 /Volumes/Backup/MyMovies/Hello.mp4 3 /Volumes/Tiger/MyMovie.mov Search for file name MyMovie should retrieve ID FilePath 1

[sqlite] SQLite 3.5.* source code location?

2007-10-21 Thread Bharath Booshan L
Hello, Could anybody tell where can I get the latest sqlite3 source code for Mac OS 10.4? Regards, Bharath --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended

Re: [sqlite] sqlite3_exec function error:database is locked

2007-10-14 Thread Bharath Booshan L
Are you using any BLOBs in your table?. More often than not it will be your query which will have direct impact on the performance. I suggest you to check that appropriate columns have been indexed and are used in right manner as specified in the SQLite documentation or mailing list with subject "

Re: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Bharath Booshan L
Hi Phani, Hope this answers your Query. SQLite version 3.1.3 Enter ".help" for instructions sqlite> create table m( mNo integer, year integer, month integer ); sqlite> insert into m values (1, 2007, 9); sqlite> insert into m values (2, 2006, 5); sqlite> insert into m values (3, 2006, 5); sqlite>

Re: [sqlite] An example for "progress" method?

2007-09-17 Thread Bharath Booshan L
I have used the prepare, step, finalize methods in order to implement the progress callback and it works fine. However, I would like to know couple of things. a. Whether the sqlite3_exec function is better in terms of performance to receive the callback? b. Will sqlite3_interrupt function stop

Re: [sqlite] An example for "progress" method?

2007-09-17 Thread Bharath Booshan L
On 9/18/07 5:00 AM, "Zbigniew Baniewski" <[EMAIL PROTECTED]> wrote: > An interesting method is "progress": > > "The progress callback can be used to display the status of a lengthy query >or to process GUI events during a lengthy query." > > But I'm not quite sure presently, how it

[sqlite] _sqlite3StrCmp not found

2007-08-30 Thread Bharath Booshan L
, Bharath Booshan L PS: It works fine in sqlite 3.3.1. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copi

Re: [sqlite] Threading issues in SQLite

2007-08-10 Thread Bharath Booshan L
MAIL PROTECTED]> wrote: > On Fri, 2007-08-10 at 11:25 +0530, Bharath Booshan L wrote: >> Hello All, >> >> I am using SQLite in one my application and I require to retrieve around >> 4-5 sets of information simultaneously. I have opted to run the queries in

[sqlite] Threading issues in SQLite

2007-08-09 Thread Bharath Booshan L
sure that a connection is used simultaneously in different threads) Looking forward to your suggestions, Bharath Booshan L --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Bharath Booshan L
Hi Stev, Prepared statements are best option, however try sqlite3_mprintf() with '%q' as format specifier which escapes every '\' character. Find more info in http://sqlite.org/capi3ref.html. Bharath Booshan L. On 8/6/07 11:50 AM, "Stephen Sutherland" <[EMAIL PROTECTED]&

[sqlite] Indexes usage on Foreign Key

2007-08-02 Thread Bharath Booshan L
d .explain does nothing :( Thanks in advance, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and dele

Re: [sqlite] strategy adding indexes

2007-07-30 Thread Bharath Booshan L
have the 3 Columns (in sequence) in the test in order to use the MyIndex? Regards, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipi

[sqlite] Is SQLite Scalable to handle large data?

2007-07-27 Thread Bharath Booshan L
, with limited INSERT & UPDATE operations. So the Query results retrieval time should be minimal. Please provide some suggestions. I will provide more information if needed. Regards, Bharath Booshan L. --- Robosoft Technologies - Come home to Techno

[sqlite] How to create in-memory database?

2007-07-24 Thread Bharath Booshan L
Hi , How do I create an in-memory database? Is there any API related to it? Please advise. Regards, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were

Re: [sqlite] Prepared Statement (select * from x where y in ());

2007-07-18 Thread Bharath Booshan L
the first null terminator will be considered. Cheers, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and d

Re: [sqlite] Finding record position

2007-07-17 Thread Bharath Booshan L
n first index of the row matching the given condition. Hope this answers your question. Cheers, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an in

[sqlite] Can ORDER-BY perform Case-Insensitive comparison?

2007-07-16 Thread Bharath Booshan L
to be sorted alphabetically irrespective of its CASE as shown below. ramesh raj Rajesh Rakesh Please anyone suggest me regarding this. Thanks in advance, Bharath Booshan L --- Robosoft Technologies - Come home to Technology Disclaimer

Re: [sqlite] SQLite Query Assistance

2007-07-11 Thread Bharath Booshan L
processes to different tasks having some Task_Name 'XYZ' stored under Task with some Task_Number. Thanks for any assistance, Bharath Booshan L --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confid

[sqlite] SQLite Query Assistance

2007-07-11 Thread Bharath Booshan L
able to be Queried The above Query takes around 7 sec approx to retrieve around 8000 ProcessIDs which is un-acceptable. Please provide me any inputs on how can I optimize this query. Thanks for any assistance Bharath Booshan L --- Robosoft Technolo