Re: [sqlite] HOWTO: Parse user SQL and add persistent SQL

2008-10-10 Thread Kristoffer Danielsson
Kristoffer Danielsson wrote:> Consider an application where the user enters a search string:> SELECT Year FROM Car WHERE Brand = 'Audi'> > Now I want to add some conditions, depending on settings in the application. For instance, I would like to modify the above SQL string to get this:> SELECT

Re: [sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-10 Thread dcharno
D. Richard Hipp wrote: > On Oct 9, 2008, at 9:11 PM, dcharno wrote: > >>> If you have issues or concerns with any aspect of the upcoming >>> release, now would be a good time to raise them. >> Is there any way to have both the BNF and syntax diagrams in the SQL >> Syntax? > > > Not really.

Re: [sqlite] HOWTO: Parse user SQL and add persistent SQL

2008-10-10 Thread Darren Duncan
Kristoffer Danielsson wrote: > Consider an application where the user enters a search string: > SELECT Year FROM Car WHERE Brand = 'Audi' > > Now I want to add some conditions, depending on settings in the application. > For instance, I would like to modify the above SQL string to get this: >

[sqlite] HOWTO: Parse user SQL and add persistent SQL

2008-10-10 Thread Kristoffer Danielsson
Consider an application where the user enters a search string: SELECT Year FROM Car WHERE Brand = 'Audi' Now I want to add some conditions, depending on settings in the application. For instance, I would like to modify the above SQL string to get this: SELECT Year, Color FROM Car WHERE Brand =

Re: [sqlite] database is locked

2008-10-10 Thread Shaun R.
it wont it was a quick example, that prep is suppose to be sqlite3_step ~Shaun ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] database is locked

2008-10-10 Thread Ken
you don't need to prepare when you use exec... The following is not a step.. Don't see how this even would compile... while(sqlite3_prep(plineInfo) == SQLITE_ROW) --- On Fri, 10/10/08, Shaun R. <[EMAIL PROTECTED]> wrote: > From: Shaun R. <[EMAIL PROTECTED]> > Subject: [sqlite] database is

[sqlite] sqlite3_open() problem

2008-10-10 Thread leandro.ribeiro
Hello Team. I have a problem with running SQLite. I am running linux 2.6.17 on *ARM* and basically problem is that my application is crushing on *sqlite3_open*() function while the sqlite3 command shell is running without problems. I added the sqlite3.h file to my project. /**/

Re: [sqlite] Quick FTS3 question: partial matches

2008-10-10 Thread Jonathon
So while trying to find a solution to my problem of finding partial strings in several columns ( finding 'this' in 'HellothisIsATest' using MATCH '*this*' ), I found out that sqlite fts3 only supports prefix matching and that if I want to do partial string matching, I would be forced to use LIKE,

[sqlite] database is locked

2008-10-10 Thread Shaun R.
I have some code that i'm having problems with. i open the database, prepare, and the step through. During each step i'm trying to run a seperate exec which is attempting to update a row. I keep getting a error that says database is locked. I tried creating a additional open to just use on

Re: [sqlite] Merging N databases

2008-10-10 Thread Igor Tandetnik
ferrety ferrety <[EMAIL PROTECTED]> wrote: > Let me give you how the DBs looks like in a real example. > Each DB contains a uniq table called URL : > > CREATE TABLE if not exists URL (name VARCHAR PRIMARY KEY, nbr > INTEGER); > > $ sqlite3 /tmp/links1.db : > sqlite> select * from URL; >

Re: [sqlite] Merging N databases

2008-10-10 Thread P Kishor
On 10/10/08, ferrety ferrety <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to SQLite and to list !!! So ... > > I've "N" sqlite DBs all produced with the same version of SQLite3 and > all having the same DB schema (only 1 table). > I'd like to merge them all in one single DB. The merge process

Re: [sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Ribeiro, Glauber
Yes, this is a little irritating. Back in the time when I used to do C, I always used strncpy and then stuck a '0' at the end of the new string. -Original Message- From: Dave Dyer [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2008 12:25 PM To: Teg; General Discussion of SQLite

[sqlite] Merging N databases

2008-10-10 Thread ferrety ferrety
Hi, I'm new to SQLite and to list !!! So ... I've "N" sqlite DBs all produced with the same version of SQLite3 and all having the same DB schema (only 1 table). I'd like to merge them all in one single DB. The merge process needs to be done as fast as possible. Let me give you how the DBs looks

Re: [sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Jay A. Kreibich
On Fri, Oct 10, 2008 at 12:59:31PM -0400, Igor Tandetnik scratched on the wall: > Shaun R. <[EMAIL PROTECTED]> wrote: > > I'm getting this warning when doing the following > > > > warning: pointer targets in passing argument 2 of 'strcpy' differ in > > signedness > > > >

Re: [sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Dave Dyer
> >strcpy(result->>ip_address,(const char*)pszData); Strcpy is one of those evil "standard" c functions that no one should every use, because it copies an unlimited and unknown amount of data into an obviously finite buffer. If some joker puts a little extra data in a sqlite IP address, and

Re: [sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Dave Dyer
> >strcpy(result->>ip_address,(const char*)pszData); Strcpy is one of those evil "standard" c functions that no one should every use, because it copies an unlimited and unknown amount of data into an obviously finite buffer. If some joker puts a little extra data in a sqlite IP address, and

Re: [sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Igor Tandetnik
Shaun R. <[EMAIL PROTECTED]> wrote: > I'm getting this warning when doing the following > > warning: pointer targets in passing argument 2 of 'strcpy' differ in > signedness > > strcpy(result->ip_address,sqlite3_column_text(plineInfo, 2)); sqlite3_column_text returns unsigned char*. Most CRT

Re: [sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-10 Thread Nicolas Williams
On Fri, Oct 10, 2008 at 10:45:11AM +0300, Cariotoglou Mike wrote: > well, since you asked, BNF is indeed more difficult to read, BUT it is > machine-readable, which means validation tools and parsers can be built. If that's what you want then there's already the grammar that Lemon uses to

[sqlite] strcpy and sqlite3_column_text

2008-10-10 Thread Shaun R.
I'm getting this warning when doing the following warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness strcpy(result->ip_address,sqlite3_column_text(plineInfo, 2)); result->ip_address is from struct result { char ip_address[17]; }; Anybody know what needs to be done

Re: [sqlite] ATTACH problem

2008-10-10 Thread D. Richard Hipp
On Oct 10, 2008, at 1:32 PM, [EMAIL PROTECTED] wrote: > > Thank you. I've finally found the problem also thanks to error > message. I haven't called sqlite3_reset() after SQLITE_BUSY so > retrying step() returned MISUSE. But what to do if I'm fetching the > rows for SELECT statement?

Re: [sqlite] ATTACH problem

2008-10-10 Thread D. Richard Hipp
On May 13, 2008, at 7:57 AM, [EMAIL PROTECTED] wrote: > > Im running ATTACH database on SQlite 3.5.8 on windows. > Im opening one database > file and attaching the second one. > On my computer it works, but it fails at other computer. The > database is opened in more > than one thread (it is

Re: [sqlite] howto setup SQLite with Powershell ?

2008-10-10 Thread Brad Stiles
>> access ... dll from PowerShell ... PowerShell docs > > the procedure given there is to register the dll with installutil. The use of the word "register" implies to me that they might be assuming a COM dll or .NET com visible assembly. I don't believe the SQLITE3.DLL qualifies as either. :)

Re: [sqlite] ATTACH problem

2008-10-10 Thread Jens Miltner
Am 09.10.2008 um 18:21 schrieb [EMAIL PROTECTED]: > > Ok it seems last time I've posted too many errors so I'll try to ask > about this one. Maybe other are just consequences of this. I've > finally received this error also on my computer, but only in release > build. > > - windows XP,

Re: [sqlite] howto setup SQLite with Powershell ?

2008-10-10 Thread HLachmann
> It's very possible you're the first one. then google will not help > Google is your friend. Not in this case. Be sure that I look around extensively before starting a thread. And so I already found your links. Both are rather nice approaches, but they depend on (an) installed and working

Re: [sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-10 Thread Michael Schlenker
D. Richard Hipp schrieb: > I suppose that announcements of this kind should really only be posted > on the sqlite-dev mailing list, not on sqlite-users. So I will likely > reframe from making subsequent pre-release announcements on sqlite- > users and use only sqlite-dev for such purposes.

Re: [sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-10 Thread Cariotoglou Mike
well, since you asked, BNF is indeed more difficult to read, BUT it is machine-readable, which means validation tools and parsers can be built. so, if you did have the BNF grammar *available* (as opposed to part of the web documentation), I personally would be happier.