Thanks, yes, I somehow didn't think my explanation made sense and in fact I just had another Excel crash, caused by the same call to sqlite_get_table.
I just can't understand why this is happening. There is a valid connection, there is a valid SQL, the DB file is there and working otherwise fine, etc. The wrapper works otherwise 100% perfect and I only have the problem in this particular procedure. I guess there must be a VBA bug then, but I just can't find it. RBS -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 February 2007 22:56 To: [email protected] Subject: Re: [sqlite] How do I know sqlite_get_table is finished sqlite_get_table does not terminate unless there is an error or it has retrieved all the records you asked for. Something else must have been causing the error, or the wrapper you are using is not implementing the function call correctly. -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -------------- Original message ---------------------- From: "RB Smissaert" <[EMAIL PROTECTED]> > Using the VB wrapper dll SQLite3VB.dll from Todd Tanner's site: > http://www.tannertech.net/sqlite3vb/index.htm > > In one particular procedure I had a serious problem when doing a call to > sqlite_get_table, causing Excel to crash. It took me a long time to pinpoint > the trouble as VBA debugging methods didn't help here. Eventually it > appeared that the trouble was calling sqlite3_close too soon after > sqlite_get_table. > Not sure if this makes sense, but after moving sqlite3_close some lines down > in that procedure the problem seems to be solved, so I take it the > connection was closed while SQLite was still fetching data, causing the > error and the Excel crash. > > So what is the best way to determine if sqlite_get_table is finished? > Running number_of_rows_from_last_call in a loop might be something, but > maybe there is something better. > > RBS > > > > ---------------------------------------------------------------------------- - > To unsubscribe, send email to [EMAIL PROTECTED] > ---------------------------------------------------------------------------- - > ---------------------------------------------------------------------------- - To unsubscribe, send email to [EMAIL PROTECTED] ---------------------------------------------------------------------------- - ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

