Re: [sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mime-Version: 1.0
Content-Type: multipart/mixed; x-avg-checked=avg-ok-786B32B5; 
boundary="===733C1D2==="

- --===733C1D2===
Content-Type: multipart/alternative; x-avg-checked=avg-ok-786B32B5; 
boundary="=_30639234==.ALT"


- --=_30639234==.ALT
Content-Type: text/plain; x-avg-checked=avg-ok-786B32B5; charset=us-ascii; 
format=flowed
Content-Transfer-Encoding: 8bit

You are right...

I changed the code to "return true" always ;)


Thanks for the tip :)

At 13:43 3/12/2004, you wrote:
>You are making a bad assumption.  sqlite3_finalize() clears
>the memory regardless of what return code you get.


KaReL (aka Steven)

Main Webpage : http://www.karels0ft.be/
ICQ #: 35217584


- --=_30639234==.ALT
Content-Type: text/html; x-avg-checked=avg-ok-786B32B5; charset=us-ascii
Content-Transfer-Encoding: 8bit



You are right...
I changed the code to return true always ;)

Thanks for the tip :)
At 13:43 3/12/2004, you wrote:
You are making a bad
assumption. sqlite3_finalize() clears
the memory regardless of what return code you get. 


KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/; eudora="autourl">http://www.karels0ft.be/
ICQ # :
35217584




- --=_30639234==.ALT--

- --===733C1D2===--

-BEGIN PGP SIGNATURE-
Version: PGP 8.0.3

iQA/AwUBQbBjO8pHmxag5XckEQKC7QCg8Kt1ou0AdSHuV1CUt8e0sUOrFdkAoLWM
6cJso/ex0wwnv0AVIOJLlKBC
=cId6
-END PGP SIGNATURE-



Re: [sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem


That's what I thought...

  int r = sqlite3_finalize(m_Stmt);
  if ( r != SQLITE_OK )
  {
    m_szErrorMsg = wxString(sqlite3_errmsg(m_DB),
wxConvUTF8);
    return false;
  }
The error I got is: "cannot start a transaction within a
transaction"
(cfr previous mail).
Thus the memory ain't cleared...
Probably I'm doing something wrong with the query, but that doesn't mean
I cannot clear the memory right?
Cheers,
Steven
At 13:01 3/12/2004, you wrote:
Steven Van Ingelgem wrote:
Hi,
Another question that arises is ... How do I clear my
memory...
Call sqlite3_finalize() on every pointer you got from
sqlite3_prepare().  Then call sqlite3_close().

-- 
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565




KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/
ICQ #    :
35217584





pgp2sycU3bCmW.pgp
Description: PGP signature


Re: [sqlite] Clearing of memory

2004-12-03 Thread D. Richard Hipp
Steven Van Ingelgem wrote:
Hi,
Another question that arises is ... How do I clear my memory...
Call sqlite3_finalize() on every pointer you got from
sqlite3_prepare().  Then call sqlite3_close().
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


[sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem


Hi,

Another question that arises is ... How do I clear my memory...
I try to close a database with a query (transaction: cfr previous mail)
prepared & database opened:

Is it enough to do "sqlite3_finalize" (which is not when for
example you are in a transaction -> memory ain't cleared).
Is it enough to do "sqlite3_close" (which is not because you
still have open statements)
is it ok to use sqlite3_free ( which probably isn't because it works on
'char*' )
When I try to use sqlite3_interrupt on my database I got
"library_misuse"
Any other options? ;)

KaReL (aka Steven)
Main Webpage :
http://www.karels0ft.be/
ICQ #    :
35217584





pgpa6SEkKCUbs.pgp
Description: PGP signature