Re: [sqlite] Specifing which index to use. Was: Performance/bug in multikey 'group by' in 3.6.2

2008-09-25 Thread Alex Scotti

On Sep 24, 2008, at 4:17 PM, Nicolas Williams wrote:


>
> But every commercial SQL RDBMS seems to have syntax for index control.

as "[EMAIL PROTECTED]" was kind enough to post on sept 21 to  
this very mailing list, not all sql rdbms have taken this approach.   
at least one, db2, chose the high road.

On Sep 21, 2008, at 12:59 PM, Stephen Woodbridge wrote:

> Richard,
. edited
>
> DB2:
> http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/ 
> com.ibm.db2.udb.doc/admin/t0005308.htm


read http://www.ibm.com/developerworks/db2/library/tips/dm-0312yip/ 
index.html as well if you could.


i implore you all to take the high road here.



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


[sqlite] Final Resolution for Index Control?

2008-09-25 Thread Russ Leighton

DRH,

I think most people like the nature of your proposal to allow control  
of indexes in queries. There were a number
of suggestions on variations of the syntax. Have you made a final  
decision on what the syntax will be?

Thx

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


[sqlite] Executing a select with like clause

2008-09-25 Thread RickLaird
I am trying to execute a select with a like clause.  I am having  
trouble passing in the string to match in the bind call.

You might notice I am writing this in cocoa.   I hope the logic comes  
across independent of the language

const char *sql = "SELECT pk FROM quotes WHERE quote like ? ";

const char *value = "%Test%";

sqlite3_bind_text(searchCategories_statement, 1, [value UTF8String],  
-1, SQLITE_TRANSIENT);


while (sqlite3_step(searchQuotes_statement) == SQLITE_ROW)
{
   //never gets to here.
}

This is where I am right now.

I have verified the result of the query

select pk FROM quotes WHERE quote like '%Test%'

returns multiple rows.

Any help would be appreciated.

Rick



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


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Sherief N. Farouk
> What do you mean by "Mapping".  There are several api wrappers for
> sqlite written in C++.  See
> http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
> 

After checking some of the things on that list, ruling out some for
superficial reasons (like thinking that C++ is Java and writingLikeThis), I
found sqlite3pp (http://code.google.com/p/sqlite3pp/ ) to be pretty darn
neat. My own version actually uses the same sqlite3pp namespace (lending
this one more points of course ;), and the google-hosted one has some of the
cleanest API designs I've ever seen, including the oh-so-neat iterators for
SELECT results. I'd say if you're looking for a C++ wrapper, go with this
one (I realize the OP might not be looking for an API wrapper). I didn't
look at the implementation (because I'm working on an already so-close
library), but I do hope it's not commented in Korean ;).

- Sherief

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


Re: [sqlite] database disk image is malformed

2008-09-25 Thread Gene Allen
Sorry, mispost
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] database disk image is malformed

2008-09-25 Thread Gene Allen
That's an error that may be left over from 1.7.  If you're  filter is using a 
mapped drive, try using a UNC.

I'm not near a computer, so I can't verify the error message.  I will as soon 
as I get back to the office and kick on the generator, I will verify it.

If you could run the User Companion on the start menu, it will package up your 
rules and FTP them to me.

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


Re: [sqlite] database disk image is malformed

2008-09-25 Thread D. Richard Hipp

On Sep 25, 2008, at 7:06 PM, Jeffrey Rennie (レニー)  
<[EMAIL PROTECTED]> wrote:

> I noticed this bug fix in 3.5.7:
> - Store the statement journal in the temporary file directory  
> instead of
> colocated with the database file.
>
> This seems fraught.  Aren't temporary directories routinely purged?   
> If you
> get unlucky and the temp directory is purged immediately after you  
> reboot,
> then your DB will be corrupt.
>

You are confusing the statement journal with the rollback journal.   
The statement journal has nothing to do with database recovery - that  
is the task of the rollback journal.  So the statement journal can be  
deleted at will without damaging the database.  And, in fact, the  
statement journal is opened with delete-on-close.

D. Richard Hipp
[EMAIL PROTECTED]



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


Re: [sqlite] database disk image is malformed

2008-09-25 Thread Jeffrey Rennie (レニー)
I noticed this bug fix in 3.5.7:
- Store the statement journal in the temporary file directory instead of
colocated with the database file.

This seems fraught.  Aren't temporary directories routinely purged?  If you
get unlucky and the temp directory is purged immediately after you reboot,
then your DB will be corrupt.

It also makes it much harder to debug issues on clients' machines, because
you can no longer just say "send me all the files in the folder yadayada..."


2008/9/25 Jeffrey Rennie (レニー) <[EMAIL PROTECTED]>

> Small correction: I'm using sqlite version 3.5.9.
>
>
> On Thu, Sep 25, 2008 at 1:08 PM, Jeffrey Rennie (レニー) <[EMAIL 
> PROTECTED]>wrote:
>
>>  I'm seeing this happen on Mac OS X, after the user hard reboots his
>> computer.  I'm compiling with -DHAVE_FULLFSYNC=1 and running with PRAGMA
>> synchronous = 2.
>>
>> Is there anything else I should set to avoid this?  I'm using
>> sqlite3.3.4.  Has this bug been fixed in a more recent version?
>>
>> Sincerely,
>> Jeffrey Rennie
>>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What happened to .bail?

2008-09-25 Thread Ribeiro, Glauber
So it is... Why didn't I see it yesterday? Sorry.

g 

-Original Message-
From: Tomas Lee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 25, 2008 1:09 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] What happened to .bail?

On 2008 September 25 (Thu) 08:40:13am PDT, "Ribeiro, Glauber"
<[EMAIL PROTECTED]> wrote:
> The documentation for sqlite3 on the web site:
> http://www.sqlite.org/sqlite.html
> 
> Lists a .bail (on|off) command (stop after hitting an error. Default
> off)
> 
> This doesn't seem to be implemented in the current version. Why? This
> seems to be an important feature for creating robust applications. 

Huh?  I just downloaded the latest sqlite3 command line program from
the website, and the .bail command is still there.

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


Re: [sqlite] database disk image is malformed

2008-09-25 Thread Jeffrey Rennie (レニー)
Small correction: I'm using sqlite version 3.5.9.

On Thu, Sep 25, 2008 at 1:08 PM, Jeffrey Rennie (レニー) <[EMAIL PROTECTED]>wrote:

>  I'm seeing this happen on Mac OS X, after the user hard reboots his
> computer.  I'm compiling with -DHAVE_FULLFSYNC=1 and running with PRAGMA
> synchronous = 2.
>
> Is there anything else I should set to avoid this?  I'm using sqlite3.3.4.
> Has this bug been fixed in a more recent version?
>
> Sincerely,
> Jeffrey Rennie
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to download a old sqlite version?

2008-09-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mariano Martinez Peck wrote:
> I cannot use the last version because I do not use sqlite directly, but
> through openDBX (http://www.linuxnetworks.de/doc/index.php/OpenDBX). I have
> openDBX working with sqlite 3.4.2 (in linux) but have problems with the last
> sqlite version (in windwos). So, I need to test 3.4.2 in windwos.

SQLite has been binary upwards compatible since 3.0.  You can just use a
newer version of the shared library and everything will work fine.

What exactly is the problem with the latest SQLite on Windows?

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFI2//emOOfHg372QQRAs6rAJ9hp0WjvNp0p8x3nVzuJBbhwrBP3QCfYvdl
B1TtThaH99X+/z4pzuNmIZ8=
=hFaD
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] database disk image is malformed

2008-09-25 Thread Jeffrey Rennie (レニー)
I'm seeing this happen on Mac OS X, after the user hard reboots his
computer.  I'm compiling with -DHAVE_FULLFSYNC=1 and running with PRAGMA
synchronous = 2.

Is there anything else I should set to avoid this?  I'm using sqlite3.3.4.
Has this bug been fixed in a more recent version?

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


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Reid Thompson

http://www.alhem.net/project/sql2class/index.html


>From version 1.7 it also supports the sqlite database (version 3).
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Jeffrey Becker
>From what I remember of CodeSmith I dont see any reason why you
couldnt simply write templates that put out C++ rather than C# or
VB.Net. If push really came to shove and you didn't have an
excessively complicated DB you could write one in vbscript pretty
easily.

On Thu, Sep 25, 2008 at 2:49 PM, Sam Carleton
<[EMAIL PROTECTED]> wrote:
> There seem to be a ton of tools out there now that will look at a
> table in a database and generate code to do selects, insert, updated,
> and deletes for languages like C#, VB.Net, Java, JavaScript, PHP  and
> other higher level languages.  I am looking for something like that
> for C++.  Here are some that I know about:
>
> http://www.sqlmaestro.com/products/sqlite/phpgenerator
> http://www.mygenerationsoftware.com
> http://www.codesmithtools.com
>
> At this point in time, I don't care about platform, I simply want to
> find a tool that will help me out.
>
> Sam
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Sam Carleton
There seem to be a ton of tools out there now that will look at a
table in a database and generate code to do selects, insert, updated,
and deletes for languages like C#, VB.Net, Java, JavaScript, PHP  and
other higher level languages.  I am looking for something like that
for C++.  Here are some that I know about:

http://www.sqlmaestro.com/products/sqlite/phpgenerator
http://www.mygenerationsoftware.com
http://www.codesmithtools.com

At this point in time, I don't care about platform, I simply want to
find a tool that will help me out.

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


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Jeffrey Becker
What do you mean by "Mapping".  There are several api wrappers for
sqlite written in C++.  See
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers



On Thu, Sep 25, 2008 at 1:31 PM, Sherief N. Farouk <[EMAIL PROTECTED]> wrote:
>> Does anyone know of any tools that are either open source or reasonably
>> priced (less then 600 USD) for mapping SQLite to C++?
>>
>> Sam
>
> [Sherief N. Farouk]
>
> No tools that I know of, but I have a small bunch of classes that I wrote to
> wrap sqlite3 objects, in order to make some things easier (like not having
> to remember to close() the DB object at every single return statement), all
> of which are convertible to the underlying sqlite types for interoperability
> with the native API. If someone's interested, I could arrange for a BSD
> release.
>
> - Sherief
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What happened to .bail?

2008-09-25 Thread Tomas Lee
On 2008 September 25 (Thu) 08:40:13am PDT, "Ribeiro, Glauber" <[EMAIL 
PROTECTED]> wrote:
> The documentation for sqlite3 on the web site:
> http://www.sqlite.org/sqlite.html
> 
> Lists a .bail (on|off) command (stop after hitting an error. Default
> off)
> 
> This doesn't seem to be implemented in the current version. Why? This
> seems to be an important feature for creating robust applications. 

Huh?  I just downloaded the latest sqlite3 command line program from
the website, and the .bail command is still there.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Sherief N. Farouk
> Does anyone know of any tools that are either open source or reasonably
> priced (less then 600 USD) for mapping SQLite to C++?
> 
> Sam

[Sherief N. Farouk] 

No tools that I know of, but I have a small bunch of classes that I wrote to
wrap sqlite3 objects, in order to make some things easier (like not having
to remember to close() the DB object at every single return statement), all
of which are convertible to the underlying sqlite types for interoperability
with the native API. If someone's interested, I could arrange for a BSD
release.

- Sherief

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


[sqlite] looking for tools to map SQLite to C++ objects

2008-09-25 Thread Sam Carleton
Does anyone know of any tools that are either open source or reasonably
priced (less then 600 USD) for mapping SQLite to C++?

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


Re: [sqlite] Network concurrency question

2008-09-25 Thread Jeffrey Becker
The long and short of it is that SQLite uses the os File-Locking APIs
for concurrency.  Network File systems vary wildly in the reliability
of their implementations of these APIs.  If you already have a server
application why not simply force all database access through that?

On Thu, Sep 25, 2008 at 12:04 PM, Gerry Snyder <[EMAIL PROTECTED]> wrote:
> Darrell Lee wrote:
>>>
>>>
>> Here is my situation: the maximum number of clients that would be
>> reading the SQLite database is 6, of that 6 the maximum number of
>> clients that might be trying to write to the SQLite db is 3.   In you
>> guys experience,  on a scale of 1-10 , 10 being the most likely to
>> happen, what are the chances of the database becoming corrupt if it is
>> on a network share?
>>
>> Thanks,
>>
> If your data are critical isn't a 1 unacceptable? And if not, isn't 10 okay?
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Network concurrency question

2008-09-25 Thread Gerry Snyder
Darrell Lee wrote:
>>   
>> 
> Here is my situation: the maximum number of clients that would be 
> reading the SQLite database is 6, of that 6 the maximum number of 
> clients that might be trying to write to the SQLite db is 3.   In you 
> guys experience,  on a scale of 1-10 , 10 being the most likely to 
> happen, what are the chances of the database becoming corrupt if it is 
> on a network share?
>
> Thanks,
>   
If your data are critical isn't a 1 unacceptable? And if not, isn't 10 okay?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] New to SQlite

2008-09-25 Thread Plopes
Thank you so much for your help


- Original Message - 
From: "Roosevelt Anderson" <[EMAIL PROTECTED]>
To: "General Discussion of SQLite Database" 
Sent: Thursday, September 25, 2008 11:10 AM
Subject: Re: [sqlite] New to SQlite


> If you are using the ADO.NET 2.0 provider from
> http://sqlite.phxsoftware.com/, then it won't work with Visual Studio
> 2003. This is because Visual Studio 2003 uses .Net 1.1 not .Net 2.0.
> If you wish to use the phxsoftware data provider try downloading
> Visual Studio Express 2005 or 2008 from Microsoft, they are both free.
>
> http://www.microsoft.com/express/product/default.aspx
>
> On Thu, Sep 25, 2008 at 9:42 AM, Plopes <[EMAIL PROTECTED]> wrote:
>> I am new to SQlite and just migrated to vb.net from vb6
>>
>> I cant find a step by step tutorial on how to add sqlite to vb.net
>>
>> i downloaded the sqlite wrapper but on the sqlite designer installation 
>> screen
>> an option should show "Visual Studio 2003"
>> i get a blank screen
>>
>> so i am not sure how to proceed
>>
>> is it because i have version 2003 of visual studio?
>>
>> Please help
>>
>> Thank you
>>
>> Paulo Lopes
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 

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


[sqlite] What happened to .bail?

2008-09-25 Thread Ribeiro, Glauber
The documentation for sqlite3 on the web site:
http://www.sqlite.org/sqlite.html

Lists a .bail (on|off) command (stop after hitting an error. Default
off)

This doesn't seem to be implemented in the current version. Why? This
seems to be an important feature for creating robust applications. 

Is there any other way to get this behavior?

Thanks,

glauber
-- 
Glauber Ribeiro
Information Security and Infrastructure
Experian Automotive  --  Schaumburg, IL
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Network concurrency question

2008-09-25 Thread Darrell Lee
[EMAIL PROTECTED] wrote:
> I would like to use SQLite from a network share.  I would like to create a
> server app that would do all of the writing to the database except for
> certain tables, one table per client,the clients would write to their own
> table only.  The client drops it's data/instructions into it's own table,
> the server app would scan all client tables for new data/instructions and
> then write the data to the main tables of the database.  Would this work
> without concurrency issues?
>
> Another question I have is do I understand correctly that an SQLite
> database, on a network share, has no problems with many readers, the
> problem starts with many writers. Is this correct?
>
> Thanks,
> TD
>
>   
Here is my situation: the maximum number of clients that would be 
reading the SQLite database is 6, of that 6 the maximum number of 
clients that might be trying to write to the SQLite db is 3.   In you 
guys experience,  on a scale of 1-10 , 10 being the most likely to 
happen, what are the chances of the database becoming corrupt if it is 
on a network share?

Thanks,

-- 
Darrell Lee
Advanced Data Systems, Inc.
119 Honeysuckle Drive
Greenville. SC 29609

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


Re: [sqlite] New to SQlite

2008-09-25 Thread Roosevelt Anderson
If you are using the ADO.NET 2.0 provider from
http://sqlite.phxsoftware.com/, then it won't work with Visual Studio
2003. This is because Visual Studio 2003 uses .Net 1.1 not .Net 2.0.
If you wish to use the phxsoftware data provider try downloading
Visual Studio Express 2005 or 2008 from Microsoft, they are both free.

http://www.microsoft.com/express/product/default.aspx

On Thu, Sep 25, 2008 at 9:42 AM, Plopes <[EMAIL PROTECTED]> wrote:
> I am new to SQlite and just migrated to vb.net from vb6
>
> I cant find a step by step tutorial on how to add sqlite to vb.net
>
> i downloaded the sqlite wrapper but on the sqlite designer installation screen
> an option should show "Visual Studio 2003"
> i get a blank screen
>
> so i am not sure how to proceed
>
> is it because i have version 2003 of visual studio?
>
> Please help
>
> Thank you
>
> Paulo Lopes
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] New to SQlite

2008-09-25 Thread Plopes
I am new to SQlite and just migrated to vb.net from vb6

I cant find a step by step tutorial on how to add sqlite to vb.net

i downloaded the sqlite wrapper but on the sqlite designer installation screen
an option should show "Visual Studio 2003"
i get a blank screen

so i am not sure how to proceed

is it because i have version 2003 of visual studio?

Please help

Thank you

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


Re: [sqlite] How to download a old sqlite version?

2008-09-25 Thread Mariano Martinez Peck
I cannot use the last version because I do not use sqlite directly, but
through openDBX (http://www.linuxnetworks.de/doc/index.php/OpenDBX). I have
openDBX working with sqlite 3.4.2 (in linux) but have problems with the last
sqlite version (in windwos). So, I need to test 3.4.2 in windwos.

many thanks,

mariano


On Wed, Sep 24, 2008 at 10:15 PM, Mariano Martinez Peck <
[EMAIL PROTECTED]> wrote:

> Sorry, I forgot to said I already tried
> http://www.sqlite.org/sqlite-3_4_2.zip and I got this:
> Document Not Found The document /sqlite-3_4_2.zip is not avaivable on this
> server
>
>
> cheers,
>
> mariano
>
>
>
>
>
> On Wed, Sep 24, 2008 at 9:51 PM, Mariano Martinez Peck <
> [EMAIL PROTECTED]> wrote:
>
>> Hi! I need to download sqlite (exe), dll and source code of sqlite 3.4.2
>> but I don't find it. Does someone know where to get it ?
>>
>> I CANNOT USE LAST SQLITE VERSION!!! I need 3.4.2
>>
>> many thanks,
>>
>> Mariano
>>
>>
>>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users