[sqlite] about sqlite3_exec function

2012-03-30 Thread YAN HONG YE
sqlite3_exec( db, "???", 0, 0, ); I wanna add this following command into sqlite3_exec func: "sqlite3 -html -header mydzh.db \"select * from dhq where ph15>10;\" >mm.html" like this: sqlite3_exec( db, "-html -header \"select * from dhq where ph15>10;\" >mm.html", 0, 0, ); but it doesn't work

Re: [sqlite] System.Data.SQLite

2012-03-30 Thread J Decker
On Fri, Mar 30, 2012 at 3:02 PM, Joe Mistachkin wrote: > > J Decker wrote: >> >> Can anyone tell me the steps to take to integrate building >> system.data.sqlite module into other solutions? >> > > This will depend on whether you want to build the mixed-mode assembly or >

Re: [sqlite] Crash in icuOpen()

2012-03-30 Thread Richard Hipp
It is easy enough for use to just put a patch in the code to fix this. But we would rather understand what is happening first. Can you recreate the problem? Can you give us any clues what you are doing in order to make this happen? On Fri, Mar 30, 2012 at 6:18 PM, Rajeev Sharma

[sqlite] Crash in icuOpen()

2012-03-30 Thread Rajeev Sharma
Hello, The SQLite library is crashing in icuOpen() function because it is trying to check the strlen of a string, which is NULL. I have also put the stack trace. In this case zInput is NULL. And so it is crashing in this line: nInput = strlen(zInput); Here is the partial function definition

Re: [sqlite] System.Data.SQLite

2012-03-30 Thread Joe Mistachkin
J Decker wrote: > > Can anyone tell me the steps to take to integrate building > system.data.sqlite module into other solutions? > This will depend on whether you want to build the mixed-mode assembly or the separate managed and native (interop) assemblies. Either way, assuming you have the

[sqlite] System.Data.SQLite

2012-03-30 Thread J Decker
Can anyone tell me the steps to take to integrate building system.data.sqlite module into other solutions? I like to have all dependancies that I can build in the same solution; but I'm having issues finding the thing that's supposed to build the .netmodule to link against... or the proper

Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

2012-03-30 Thread Simon Slavin
On 30 Mar 2012, at 6:27pm, "Agrawal, Manish" wrote: > Thanks very much. Most of our tables do have datetime fields. Not in SQLite they don't. There is no such datatype in SQLite. Find out how you're storing your dates, and declare your

Re: [sqlite] SQLite Profiler

2012-03-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30/03/12 01:45, TeDe wrote: > We 've been using profilers for Sybase and MySQL, where you can see a > lot more: index usage, number of page reads, returning rows and time - > for the whole query and for every subquery. Note that SQLite runs as a

Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

2012-03-30 Thread Agrawal, Manish
Thanks very much. Most of our tables do have datetime fields. Manish -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin Sent: Friday, March 30, 2012 9:45 AM To: 'General Discussion of SQLite Database' Subject:

Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

2012-03-30 Thread Joe Mistachkin
Agrawal, Manish wrote: > > So my question is: is this a bug or a feature in System.Data.SQLite > The behavior seen here does not originate with System.Data.SQLite. It has to do with how the .NET Framework System.Data.* infrastructure classes (e.g. DbCommandBuilder) build the WHERE clause

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Igor Tandetnik
Bert Huijben wrote: > int not; /* True if the NOT keyword is present */ "not" is a so-called alternative token for !. In C++, it's built into the language, and cannot be used as an identifier. In C, it is defined as a macro in iso646.h header. If nothing else, it's

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Pavel Ivanov
> Maybe you somehow include a file that redefines 'not'? That's a brilliant idea. Just change "not" to "!" here: >  int not;         /* True if the NOT keyword is present */ And after that I'm sure you'll see error saying > ..\Sources\sqlite3.c(107831) : error C2143: syntax error : missing ':'

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Rob Richardson
This leads me to agree with the person who suggested that a #define someplace is telling the precompiler to change "not" to something else. There is a compiler setting that will generate a file with an extension of ".i" that is the output of the precompiler. You could try doing that and

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Teg
Hello Marco, You have to make sure it's building as C and not C++. This suggests you might have your project set to build everything as C++. In my case, I made a new subproject for Sqlite that builts it into a Lib. Then I set the build dependencies so the lib is used automatically at link time.

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Marco Bambini
Please note that if I use the same compiler to compile sqlite3.c as a single c file than everything is compiled without errors. Errors occurs only when sqlite3.c is part of a c++ project. I also manually set sqlite3.c to be compiled as C file instead of Default without any luck. Seems like

Re: [sqlite] DML from .read in DOS Shell

2012-03-30 Thread Simon Slavin
On 29 Mar 2012, at 4:38pm, Randall Kuchik wrote: > I get the incomplete SQL error when I attempt to run DML command in files > (INSERT, UPDATE, DELETE, SELECT) using the .read command. I am able to run > any DDL statements I try (CREATE, ALTER, etc.) with no problem. I am

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Bert Huijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Marco Bambini > Sent: vrijdag 30 maart 2012 9:52 > To: General Discussion of SQLite Database > Subject: [sqlite] Visual Studio 2008 Express and sqlite3.c > > I am trying

[sqlite] DML from .read in DOS Shell

2012-03-30 Thread Randall Kuchik
I get the incomplete SQL error when I attempt to run DML command in files (INSERT, UPDATE, DELETE, SELECT) using the .read command. I am able to run any DDL statements I try (CREATE, ALTER, etc.) with no problem. I am using SQLite 3.7.11 on Windows XP. sqlite> .read x5.txt Error: incomplete SQL:

Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

2012-03-30 Thread Agrawal, Manish
Thanks The connection was indeed getting closed. On further debugging, I found this is because the SQL created by the designer for the update command requires a matching of all fields in the WHERE clause. Below are some examples from the designer.cs file:

Re: [sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Nick Shaw
-Original Message- > I am trying to compile the latest sqlite 3.7.11 amalgamation C file within a > Visual Studio 2008 Express C++ project. > sqlite3.c is correctly set as to be compiled as C code but I am unable to > find out a way to fix some compilation errors: > > Compiling... >

Re: [sqlite] put jpg into sqlite database

2012-03-30 Thread Simon Davies
On 30 March 2012 10:39, YAN HONG YE wrote: > this following code is my import girl.jpg to my sqlite database, but I don't > know why JPG didn't up to the bin.db. > > #include > #include > #include > #include"sqlite3.h" > > #pragma comment(lib, "sqlite3.lib") > > sqlite3 *

Re: [sqlite] SQLite Profiler

2012-03-30 Thread Simon Slavin
On 30 Mar 2012, at 9:45am, TeDe wrote: > is anyone aware of a profiler for SQLite? I know the "Explain Query > Plan", but this is too simple for what I'm looking for. As well as EXPLAIN QUERY PLAN there is also EXPLAIN (without the QUERY PLAN):

[sqlite] put jpg into sqlite database

2012-03-30 Thread YAN HONG YE
this following code is my import girl.jpg to my sqlite database, but I don't know why JPG didn't up to the bin.db. #include #include #include #include"sqlite3.h" #pragma comment(lib, "sqlite3.lib") sqlite3 * db; sqlite3_stmt *stat; int main(int argc, char **argv) { char *zErrMsg=0; FILE

Re: [sqlite] make sqlite3_analyzer No rule to make target `sqlite3_analyzer'. Stop.

2012-03-30 Thread Tim Streater
On 30 Mar 2012 at 04:11, vaiStardom wrote: > I can't seem to use the sqlite3_analyzer on my MacBook Pro 2010 i7. > > Following the instructions in the book 'The Definitive Guide To Sqlite', to > analyze the test.db all I have to do is issue the command 'sqlite3_analyzer >

[sqlite] SQLite Profiler

2012-03-30 Thread TeDe
Hello, is anyone aware of a profiler for SQLite? I know the "Explain Query Plan", but this is too simple for what I'm looking for. We 've been using profilers for Sybase and MySQL, where you can see a lot more: index usage, number of page reads, returning rows and time - for the whole query and

[sqlite] Bug in init of ICU extension

2012-03-30 Thread Alexey Pechnikov
$ sqlite3 SQLite version 3.7.12 2012-03-30 07:13:09 sqlite> .load './libsqliteicu.so' sqlite> SELECT icu_load_collation('ru_RU', 'russian'); sqlite> select 'ы' like 'Ы' collate russian; 1 $ sqlite3 SQLite version 3.7.12 2012-03-30 07:13:09 sqlite> SELECT load_extension('./libsqliteicu.so');

[sqlite] Visual Studio 2008 Express and sqlite3.c

2012-03-30 Thread Marco Bambini
I am trying to compile the latest sqlite 3.7.11 amalgamation C file within a Visual Studio 2008 Express C++ project. sqlite3.c is correctly set as to be compiled as C code but I am unable to find out a way to fix some compilation errors: Compiling... sqlite3.c ..\Sources\sqlite3.c(107831) :

Re: [sqlite] xBestIndex/xFilter Bug(?) when using LIKE "F%"

2012-03-30 Thread Kurt Keller
Am Thu, 29 Mar 2012 21:32:10 +0700 schrieb Dan Kennedy : > On 03/23/2012 03:59 PM, Kurt Keller wrote: > > I have a virtual table implementation, that implements the > > xBestIndex/xFilter funktions and I found the following problem: > > > > This query > > > >SELECT *