[sqlite] Confused

2011-05-05 Thread arjabh say
Hi All, I have a sqlite database with single table with columns A, B and C. I have created composite primary key on A and B, and an autoindex was created (dont know on which columns this index is created). When I fire select/delete query with WHERE clause on column A, it is completed in milliseco

Re: [sqlite] System.Data.SQLite blob column exception

2011-05-05 Thread Tim Butterfield
On Thu, May 5, 2011 at 7:16 PM, Simon Slavin wrote: > > On 6 May 2011, at 12:17am, Tim Butterfield wrote: > >> Since my blob column can >> contain either text or binary file data, both cases are valid.  Does >> VerifyType need to add a valid DbType.Binary for case >> TypeAffinity.Text or is someth

Re: [sqlite] System.Data.SQLite blob column exception

2011-05-05 Thread Stephan Beal
On Fri, May 6, 2011 at 2:16 AM, Simon Slavin wrote: > SQLite allows any column to contain values of any type. If > SQLiteDataReader.VerifyType is to respect that then I don't think it has any > use at all. On the other hand, if you choose to use it with your database, > then presumably you shou

Re: [sqlite] System.Data.SQLite blob column exception

2011-05-05 Thread Simon Slavin
On 6 May 2011, at 12:17am, Tim Butterfield wrote: > Since my blob column can > contain either text or binary file data, both cases are valid. Does > VerifyType need to add a valid DbType.Binary for case > TypeAffinity.Text or is something else going on here? SQLite allows any column to contain

[sqlite] System.Data.SQLite blob column exception

2011-05-05 Thread Tim Butterfield
SQLiteDataReader.VerifyType thows an exception if it does not find matching DbType and TypeAffinity. I found a case where a select on several columns, one of which is type blob, had TypeAffinity.Text for that column instead of TypeAffinity.Blob. If the column has binary data, TypeAffinity.Blob(4)

Re: [sqlite] new to sqlite rec'd BadImageFormatException error

2011-05-05 Thread kp2011
Now I understand better , I need the ado net for vs2008 I have a version but it does not find my table (thats the only error so far) this is what I have System.Data.SQLite.dll 1.0.66.0 883 KB (904,704 bytes) modified ‎Sunday, ‎April ‎18, ‎2010, ‏‎1:58:58 PM ‎Original filename SQLite3.DLL 3.6.23.

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Jay A. Kreibich
On Thu, May 05, 2011 at 01:52:39PM +0200, Guillaume BIENKOWSKI scratched on the wall: > So you get it, if the step is returning SQLITE_ROW, we'll never get the > profile callback triggered. > Then it's not my fault. I thought I was doing something wrong here, and that > my base could be corrupted

Re: [sqlite] new to sqlite rec'd BadImageFormatException error

2011-05-05 Thread kp2011
I got it passed this error by using different SQLite library and the ADO.NET provider(an older one) its a bit confusing for a newbie. what is the newest I could use for vb net 2008? Filip Navara-3 wrote: > > What platform is set as target for the VB.NET code (x86 / x64 / Any CPU)? > Which bui

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/05/2011 04:52 AM, Guillaume BIENKOWSKI wrote: > Also, I didn't dive in the code, but is there a reason to filter these? > I guess it is to *not* trigger the callback multiple times (if you do > multiple calls to step()). Profile is telling you h

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Guillaume BIENKOWSKI
> I have no idea about the 'profile' thing, but since you want your statement >to end (i.e. return SQLITE_DONE) after the first retrieved record, I recommend >using 'LIMIT 1' in your query. That's actually what I'm doing =) Example: # SELECT * FROM mytable WHERE key = ? ORDER BY userid DESC LI

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Marian Cascaval
>From: Guillaume BIENKOWSKI To: General Discussion of SQLite Database Sent: Thu, May 5, 2011 3:00:55 PM Subject: Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE? >Okay we answered at the same time. Indeed :) >I have no problem concerning the retrieving of data, I u

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Guillaume BIENKOWSKI
Okay we answered at the same time. I have no problem concerning the retrieving of data, I use sqlite3_column() to get the data I need. The callback I'm talking about is the *profiling* callback, not the one you're thinking about (you're talking about the callback you pass when using sqlite3_exec()

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Guillaume BIENKOWSKI
Okay I'll answer myself: In the SQlite 3.6.0 source code you get this: // 3.6.0 (vdbeapi.c) #ifndef SQLITE_OMIT_TRACE /* Invoke the profile callback if there is one */ if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->nOp>0 && p->aOp[0].opcode==OP_Trace && p->aOp[0].p4.z

Re: [sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Marian Cascaval
Please, read once more the documentation: http://www.sqlite.org/cintro.html sqlite3_step() does not trigger any callback function, it only tells you if there's any data to retrieve. If you want to retrieve data, either use sqlite3_column() in your exemplified typical code, or use sqlite3_exec

[sqlite] Profile API: triggered only when sqlite3_step() returns DONE?

2011-05-05 Thread Guillaume B
Hey guys, I'm trying to use the sqlite3_profile() function to monitor the delays of the requests I make in my application. I can see some of the statements in my trace, but it seems that not all the statements trigger the callback. Some context informations first: - sqlite3 is in version 3.6.0, r