[sqlite] how to restore the column values into the structure.

2012-01-19 Thread bhaskarReddy
Hi Friends, How to store the values of a columns in to the appropriate variables. struct ABC { int a; int b; char *str; }; a bname 1 2 ABCD 2 4 WXYZ

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Max Vlasov
John, another suggestion Can you test previous sqlite versions one by one towards older ones with one of your problem queries until the results are "good" again and send both good and bad EXPLAIN QUERY output here. I'm sure this will be greek for most of us :), but when Richard or Dan look at the

[sqlite] 3.7.10 problem : SQLite header and source version mismatch

2012-01-19 Thread Kevin Youren
G'day, thanks for such a great program. Slight problem with sqlite-autoconf-3071000 When I issue from the command line: sqlite3 I get SQLite header and source version mismatch 2011-06-23 19:49:22 4374b7e83ea0a3fbc3691f9c0c936272862f32f2 2012-01-16 13:28:40

Re: [sqlite] What to download for SharpDevelop?

2012-01-19 Thread Lou Arnold
OK. Thanks. On Thu, Jan 19, 2012 at 7:30 PM, Simon Slavin wrote: > > On 19 Jan 2012, at 10:37pm, Lou Arnold wrote: > > > When you say "amalgamation code" are do you mean source code? > > If you're programming in C or any superset of C then yes, you can get a > specially

Re: [sqlite] What to download for SharpDevelop?

2012-01-19 Thread Simon Slavin
On 19 Jan 2012, at 10:37pm, Lou Arnold wrote: > When you say "amalgamation code" are do you mean source code? If you're programming in C or any superset of C then yes, you can get a specially optimised 'amalgamation' version of the source code all in two files (.c and .h) from

Re: [sqlite] What to download for SharpDevelop?

2012-01-19 Thread Lou Arnold
Hello Simon, When you say "amalgamation code" are do you mean source code? And if so then I should compile SQLite? Are the pre-compiled binaries not suitable? If I were using Visual Studio, then a few DLLs would all that's needed. SharpDevelop uses these DLLs just as they are. Lou. On Thu, Jan

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
One more useful comparison. The following query is prepared and step is called with these results: step: UPDATE RESPONSES SET RESPONSE_NAME = :RESPONSE_NAME WHERE RESPONSE_OID = :RESPONSE_OID Cumulative Allocated Memory: 10,992 Count of _malloc Calls:18

Re: [sqlite] What to download for SharpDevelop?

2012-01-19 Thread Simon Slavin
On 19 Jan 2012, at 7:46pm, Lou Arnold wrote: > 1) I need a DLL to reference data objects in a C# Application developed > under SharpDevelop - (Like VS), using .Net Framework 4. But I also need to > access a SQLite database from the application. Does the DLL do both or will > I need SQLite3.exe

Re: [sqlite] What to download for SharpDevelop?

2012-01-19 Thread Reid Thompson
On Thu, 2012-01-19 at 14:46 -0500, Lou Arnold wrote: > I read the list of downloads for SQLite, but I'm confused. these examples may be of use http://sqlite.phxsoftware.com/forums/p/76/266.aspx ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] What to download for SharpDevelop?

2012-01-19 Thread Lou Arnold
I read the list of downloads for SQLite, but I'm confused. 1) I need a DLL to reference data objects in a C# Application developed under SharpDevelop - (Like VS), using .Net Framework 4. But I also need to access a SQLite database from the application. Does the DLL do both or will I need

Re: [sqlite] Is it necessary free returned results when sqlite3_get_table get an error?

2012-01-19 Thread Marc Cals
Ok, Thanks for your help. On 19 January 2012 19:07, Richard Hipp wrote: > On Thu, Jan 19, 2012 at 1:03 PM, Marc Cals wrote: > > > Hello, > > > > I have one doubt about sqlite3_get_table() method. When it returns an > error > > is it necessary to free

Re: [sqlite] Is it necessary free returned results when sqlite3_get_table get an error?

2012-01-19 Thread Richard Hipp
On Thu, Jan 19, 2012 at 1:03 PM, Marc Cals wrote: > Hello, > > I have one doubt about sqlite3_get_table() method. When it returns an error > is it necessary to free returned results invoking sqlite3_free_table > method? Or when an error produced return NULL value as result ? >

[sqlite] Is it necessary free returned results when sqlite3_get_table get an error?

2012-01-19 Thread Marc Cals
Hello, I have one doubt about sqlite3_get_table() method. When it returns an error is it necessary to free returned results invoking sqlite3_free_table method? Or when an error produced return NULL value as result ? Thanks ___ sqlite-users mailing list

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
On Thu, Jan 19, 2012 at 11:49 AM, John Elrick wrote: > I've added more tracking to our libraries. Most queries result in minimal > (<200 calls) _malloc activity, But I have found several anomalies. I am > listing some representatives below. In the examples below,

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
I've added more tracking to our libraries. Most queries result in minimal (<200 calls) _malloc activity, But I have found several anomalies. I am listing some representatives below. In the examples below, "step" is the operation. Note also that all queries should have been prepared with

Re: [sqlite] ATTACH 'file' to a :memory: database fails

2012-01-19 Thread Richard Hipp
On Thu, Jan 19, 2012 at 11:24 AM, Hauptmann Peter wrote: > Hi, > > I am trying to create an in-memory database and then attach an "real" > database to it: > > sqlite3_open_v2(":memory:", ...); > sqlite3_exec(db, "ATTACH c:\\temp\\sqlite\\small.sdb AS disk", ...); > Did you

[sqlite] ATTACH 'file' to a :memory: database fails

2012-01-19 Thread Hauptmann Peter
Hi, I am trying to create an in-memory database and then attach an "real" database to it: sqlite3_open_v2(":memory:", ...); sqlite3_exec(db, "ATTACH c:\\temp\\sqlite\\small.sdb AS disk", ...); Attach fails with  Error 1: SQL logic error or missing database. All other 3 cases (attach disk db

Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-19 Thread Joe Mistachkin
Joe Winograd wrote: > > I guess there's no solution that the end-user can deploy in this case. It's > not even clear to me how the HP and/or Intuit programmers can solve the > problem, since I replaced the HP Connection Manager with the > latest one and TurboTax doesn't even have a anywhere

Re: [sqlite] Memory exception in sqlite3DbFree when called from sqlite3VdbeMemReleaseExternal as SQLITE_DYNAMIC

2012-01-19 Thread Dan Kennedy
On 01/19/2012 04:20 AM, Donald Bryant-Rich wrote: In the function sqlite3VdbeMemReleaseExternal calls sqlite3DbFree which is passed into the function as the xDel component of the Mem argument to the function (p): if( p->flags_Dyn&& p->xDel ){ assert( (p->flags_RowSet)==0 );

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
On Thu, Jan 19, 2012 at 8:25 AM, John Elrick wrote: > > > On Thu, Jan 19, 2012 at 8:15 AM, Richard Hipp wrote: > >> On Thu, Jan 19, 2012 at 8:10 AM, John Elrick > >wrote: >> >> > >> > I've been reading through the code. Do I

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Simon Slavin
On 19 Jan 2012, at 1:25pm, John Elrick wrote: > is triggering sqlite3Reprepare like clockwork. So, given that none of the > listed conditions are occurring, what else could be causing sqlite3Step to > return SQLITE_SCHEMA? It warms my heart to follow this wonderful technical detective story.

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
On Thu, Jan 19, 2012 at 8:15 AM, Richard Hipp wrote: > On Thu, Jan 19, 2012 at 8:10 AM, John Elrick >wrote: > > > > > I've been reading through the code. Do I understand correctly that if > one > > prepared statement binding is changed in such a way

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Richard Hipp
On Thu, Jan 19, 2012 at 8:10 AM, John Elrick wrote: > > I've been reading through the code. Do I understand correctly that if one > prepared statement binding is changed in such a way as may influence the > choice of the query plan that all the prepared statements for

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
On Thu, Jan 19, 2012 at 8:03 AM, Richard Hipp wrote: > On Thu, Jan 19, 2012 at 7:51 AM, John Elrick >wrote: > > > Interesting: > > > > 1. There are no database schema changes occurring after the system is > fully > > initialized > > 2. There are no

[sqlite] Memory exception in sqlite3DbFree when called from sqlite3VdbeMemReleaseExternal as SQLITE_DYNAMIC

2012-01-19 Thread Donald Bryant-Rich
In the function sqlite3VdbeMemReleaseExternal calls sqlite3DbFree which is passed into the function as the xDel component of the Mem argument to the function (p): if( p->flags_Dyn && p->xDel ){ assert( (p->flags_RowSet)==0 ); p->xDel((void *)p->z); p->xDel = 0; } sqlite3DbFree is

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Richard Hipp
On Thu, Jan 19, 2012 at 7:51 AM, John Elrick wrote: > Interesting: > > 1. There are no database schema changes occurring after the system is fully > initialized > 2. There are no ATTACHed databases (we checked that earlier) > 3. There are no calls to VACUUM > 4. As far

Re: [sqlite] Is there any API that will return a record based on Primary key.

2012-01-19 Thread Igor Tandetnik
bhaskarReddy wrote: > Is there any SQLite API for returning a record based on particular > Primary key id. No special API. You just run a statement of the form select * from MyTable where MyPrimaryKeyColumn = ?; -- Igor Tandetnik

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
Interesting: 1. There are no database schema changes occurring after the system is fully initialized 2. There are no ATTACHed databases (we checked that earlier) 3. There are no calls to VACUUM 4. As far as I am aware, there are no changes to any callbacks after the system is fully initialized.

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread Richard Hipp
On Thu, Jan 19, 2012 at 7:41 AM, John Elrick wrote: > Question: > > If a query has already been prepared with sqlite3_prepare_v2, why would > sqlite3_step need to call sqlite3Prepare, which in turn calls > sqlite3RunParser? > Because the database schema changed. Or

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-19 Thread John Elrick
Question: If a query has already been prepared with sqlite3_prepare_v2, why would sqlite3_step need to call sqlite3Prepare, which in turn calls sqlite3RunParser? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Is there any API that will return a record based on Primary key.

2012-01-19 Thread Simon Slavin
On 19 Jan 2012, at 10:18am, bhaskarReddy wrote: > Is there any SQLite API for returning a record based on particular > Primary key id. Bhaskar, time to get a book on SQL and read it. Simon. ___ sqlite-users mailing list

Re: [sqlite] SQLite API for counting number of records in a table.

2012-01-19 Thread Simon Slavin
On 19 Jan 2012, at 9:16am, bhaskarReddy wrote: >If i execute the command "SELECT COUNT (*) FROM table;" how > i will get the return value i.e., number of records in the table ? It is returned from that query just like the results of any other query. That command would return a

[sqlite] insert image into db - windows batch

2012-01-19 Thread Larry Brasfield
For grins, and because I like scriptable DB operations, I've modified the SQLite shell.c source to make insertion of blobs from files, and extraction of blobs to files, work, efficiently, without extra tools and without changing the representation. The relevant section of the shell's help

Re: [sqlite] sqlite.net download file

2012-01-19 Thread majorthorburn
> > majorthorb...@mst-it-services.info wrote: >> >> I have tried to install sqlite from what I thought were the correct >> files >> > > Which files are you referring to? What site did you download them from? > sqlite-netFx40-setup-bundle-x64-2010-1.0.77.0.exe from system.data.sqlite.org

Re: [sqlite] sqlite.net download file

2012-01-19 Thread Joe Mistachkin
majorthorb...@mst-it-services.info wrote: > > I have tried to install sqlite from what I thought were the correct files > Which files are you referring to? What site did you download them from? > > but have not managed to find the sqlite.net folder that the help file > mentions as support for

[sqlite] sqlite.net download file

2012-01-19 Thread majorthorburn
I have tried to install sqlite from what I thought were the correct files but have not managed to find the sqlite.net folder that the help file mentions as support for .net. Anyone give me a hint please? Regards, Major. p.s. Major is my Christian name.

Re: [sqlite] Library run-time error

2012-01-19 Thread Joe Mistachkin
ASURADA wrote: > > What's the problem. How to fix this problem. > (I use Visual C++ 2005 on Windows 7 x64) > In your project, please define the _WIN32_WINNT macro to 0x500 and try again. -- Joe Mistachkin ___ sqlite-users mailing list

Re: [sqlite] Library run-time error

2012-01-19 Thread Jens Frederich
On Thu, Jan 19, 2012 at 11:40 AM, ASURADA wrote: > > Error Message > == > Unhandled exception at 0x in SQLite3Test.exe: 0xC005: Access > violation reading location 0x. Hi, has you build a debug version of your test app and library?

[sqlite] Library run-time error

2012-01-19 Thread ASURADA
I use sqlite library that is compiled by myself. Because I need static library and 64bit library. So I try to make library for version 3.7.10. It was successfully. No error occur on compile time. But It was not work. My SQLite library gave me a error message. My code is fine with 3.7.9. In case of

Re: [sqlite] Collecting return values from sql commands using SQLite APIs.

2012-01-19 Thread Max Vlasov
On Thu, Jan 19, 2012 at 1:49 PM, bhaskarReddy wrote: > > Hi Friends, > > is it possible to collect return value of a SQL command. ex: > SELECT COUNT(*) FROM table; will return number of records in a table. Is > there any SQLite API to return this value. > > It's the

[sqlite] Is there any API that will return a record based on Primary key.

2012-01-19 Thread bhaskarReddy
HI Friends, Is there any SQLite API for returning a record based on particular Primary key id. Regards, Bhaskar Reddy. -- View this message in context: http://old.nabble.com/Is-there-any-API-that-will-return-a-record-based-on-Primary-key.-tp33166831p33166831.html Sent from the

[sqlite] Collecting return values from sql commands using SQLite APIs.

2012-01-19 Thread bhaskarReddy
Hi Friends, is it possible to collect return value of a SQL command. ex: SELECT COUNT(*) FROM table; will return number of records in a table. Is there any SQLite API to return this value. Regards, Bhaskar Reddy. -- View this message in context:

Re: [sqlite] SQLite API for counting number of records in a table.

2012-01-19 Thread bhaskarReddy
Hi Binns, If i execute the command "SELECT COUNT (*) FROM table;" how i will get the return value i.e., number of records in the table ? Regards, BhaskarReddy Roger Binns wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 18/01/12 23:47, bhaskarReddy wrote:

Re: [sqlite] insert image into db - windows batch

2012-01-19 Thread Petr Lázňovský
> On Thu, Jan 19, 2012 at 1:49 AM, Kevin Benson wrote: >> On Wed, Jan 18, 2012 at 8:16 PM, Simon Slavin wrote: >>> On 18 Jan 2012, at 11:13pm, Petr Lázňovský wrote: >>> > Look like script for different platform, but "od" and "tr" are >>>