Re: [sqlite] C++ - nothing has been stored!!??

2012-07-24 Thread Igor Tandetnik
On 7/24/2012 9:27 PM, Arbol One wrote: void mySQLite3Class::write(const Glib::ustring& sql_stmt, int pos, int data )throw(someException) { rc = sqlite3_prepare_v2(db, sql_stmt.c_str(), -1, , NULL); if(rc != SQLITE_OK) { throw(someException)} rc = sqlite3_bind_int(stmt, pos,

[sqlite] C++ - nothing has been stored!!??

2012-07-24 Thread Arbol One
And here I am again, asking for what you find so easy and I. well, just cannot understand. I am trying to write to a database table previously created by another process like this: void someClass::create_tblName() { sql_param_tblName = "CREATE TABLE name(n_id INTEGER PRIMARY KEY, title

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Arbol One
Thanks everyone, I just wanted to be sure. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Tuesday, July 24, 2012 4:16 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] C++ -

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Richard Hipp
On Tue, Jul 24, 2012 at 4:13 PM, Arbol One wrote: > I would like to turn on the extended result codes, however, the prototype > below does not explain what the value for the second parameter should be. > > Can anybody help? > > int sqlite3_extended_result_codes(sqlite3*, int

Re: [sqlite] EXT : C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Black, Michael (IS)
Should be this: on = true = !0 = 1 (other !=0 values also work typically) off = false = 0 Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From:

Re: [sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Marc L. Allen
I would assume that onoff is either zero or non-zero. Zero turns off the extended codes, non-zero turns them on. The code seems to support that, but I didn't delve too deeply. Marc -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On

[sqlite] C++ - sqlite3_extended_result_codes(

2012-07-24 Thread Arbol One
I would like to turn on the extended result codes, however, the prototype below does not explain what the value for the second parameter should be. Can anybody help? int sqlite3_extended_result_codes(sqlite3*, int onoff); TIA ___ sqlite-users

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Joe Mistachkin
Bernhard Mogens Ege wrote: > > Has _anyone_ made ":memory:;cache=shared" work in C#/System.Data.SQLite? > I think you want "FullUri=file::memory:?cache=shared;" instead (using the code on trunk). -- Joe Mistachkin ___ sqlite-users mailing list

Re: [sqlite] SQLite4 key encoding -- Is it ever decoded?

2012-07-24 Thread Nico Williams
On Tue, Jul 24, 2012 at 8:29 AM, Steven E. Harris wrote: > Richard Hipp writes: >> Many keys can be decoded, but for TEXT keys with application-defined >> collating sequences, the encoding is not reversible. Many applications >> will

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Finally made it work, but still not automatic... I added those projects from 1.0.81.0 but their resulting DLLs weren't copied to the target directory. I don't know why. I could copy them manually there, though. The DLL from SQLite.Interop.2010 was named System.Data.SQLite.dll and I had to

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread J Decker
also have to select x86(win32) or x64(x64) as a build type for the interop module. Everything else needs to build as Any CPU. On Tue, Jul 24, 2012 at 5:42 AM, Bernhard Mogens Ege wrote: > I have now done nearly exactly as you wrote, with these differences: > > I have added the

Re: [sqlite] SQLite4 key encoding -- Is it ever decoded?

2012-07-24 Thread Richard Hipp
On Tue, Jul 24, 2012 at 9:29 AM, Steven E. Harris wrote: > > If, as you say, SQLite cannot (or will not) extract values from an > encoded key, then does the covering index really just encode column > values a and b as the key, and store values for c and d in a record >

Re: [sqlite] SQLite4 key encoding -- Is it ever decoded?

2012-07-24 Thread Simon Slavin
On 24 Jul 2012, at 2:29pm, "Steven E. Harris" wrote: > A (too) literal reading of this would suggest that the index is the > key-encoded concatenation of -- to use the example from that first Wiki > page -- four values for columns a, b, c, and d. However, if one were to > query

Re: [sqlite] SQLite4 key encoding -- Is it ever decoded?

2012-07-24 Thread Steven E. Harris
Richard Hipp writes: > It would be convenient to be able to decode the keys. But it is not > possible to do so, in general. This, then, takes my inquiry to the topic of covering indices. On the "The Design of SQLite4" Wiki pageĀ¹, it says (emphasis

Re: [sqlite] C++ - Creating Table

2012-07-24 Thread Robert Myers
On 7/23/2012 10:51 PM, Keith Medcalf wrote: And of course, finalize after close is wrong. You finalize the statement, then close the db, then bail. Which goes back to the point I was making, don't manage resources yourself. Let the compiler do it. The close should've been only in the

Re: [sqlite] read sql script file

2012-07-24 Thread Black, Michael (IS)
You're going to get questions like "why do you want to do this" so you may as well tell us now. The usual way to do his is to execute the sql yourself using statement prepares and step. It gives you a lot more control over error messages. Why don't you want to do it this way? The 2nd way

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
I have now done nearly exactly as you wrote, with these differences: I have added the project System.Data.SQLite.Linq.2010 as well and made it depend on System.Data.SQLite.2010. I did not disable the XML generation. I made my project depend on System.Data.SQLite.2010 and

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Thank you for the suggestion. But my binary keeps loading the System.Data.SQLite from the GAC instead of from the project (I added a reference to the DLL from the System.Data.SQLite project, seemed like the way to do it). The dll hell is even worse in .NET. :-/ Has _anyone_ made

Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3

2012-07-24 Thread Shlomi Fish
Hi Richard, On Mon, 23 Jul 2012 12:57:01 -0400 Richard Hipp wrote: > On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fish wrote: > > > > > I first suspected svn was the culprit, so I rebuilt it, but it still > > happened. > > Then I tried build SQLite and

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-24 Thread Simon Slavin
On 24 Jul 2012, at 6:58am, Durga D wrote: > My Req. is: I have to write a wrapper for sqlite3. This wrapper will be > called by different clients from different threads within the process. > Requests might be read or write. Wrapper will have static sqlite3*. So all >

[sqlite] read sql script file

2012-07-24 Thread YAN HONG YE
in the shell.c source file ,have a function .read file, and I wanna use it to my c++ code, when I hava a sql script file,such as : create table test (id integer primary key, value text); insert into test (id, value) values(1, 'eenie'); insert into test (id, value) values(2, 'meenie'); insert