PowerBASIC Forums
  Programming
  SQLite framework (Page 2)

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone!
This topic is 2 pages long:   1  2 
next newest topic | next oldest topic
Author Topic:   SQLite framework
Stan Durham
Member
posted November 11, 2005 03:08 PM     Click Here to See the Profile for Stan Durham     Edit/Delete Message   Reply w/Quote
Terence,
It doesn’t appear that the memory is being freed.

Bail:
sqlite_free_table lpTable

if you quote this out,
'FOR i = 0 TO iFields
' zField = @lpTable[i]
' arrResults(iRow, iCol) = @zField
' INCR iCol : IF iCol = nColumns THEN iCol = 0
' IF (i+1) MOD nColumns = 0 THEN INCR iRow
'NEXT I

run the query over and over on a large table, the memory use keeps going up
doesn’t get freed until the database is closed

------------------

IP: Logged

Terence McDonnell
Member
posted November 14, 2005 08:55 PM     Click Here to See the Profile for Terence McDonnell     Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Stan Durham:
It doesn’t appear that the memory is being freed.
[/B]

Hey Stan;

I'll try to take a look at this next weekend.

My week is shot already fixing problems that are
happening with database running on several huge servers...

look forward to troubleshooting one that can run on a floppy...

seeya - Terence.

------------------

IP: Logged

james klutho
Member
posted November 15, 2005 06:33 PM     Click Here to See the Profile for james klutho     Edit/Delete Message   Reply w/Quote
Does lpTable need to be passed byval in the sqlite_free_table call?

------------------

IP: Logged

Stan Durham
Member
posted November 15, 2005 08:41 PM     Click Here to See the Profile for Stan Durham     Edit/Delete Message   Reply w/Quote
didn't make a difference

------------------

IP: Logged

james klutho
Member
posted November 15, 2005 10:37 PM     Click Here to See the Profile for james klutho     Edit/Delete Message   Reply w/Quote
Shucks. The sqlite_get_table function had the lpTable parameter
dereferenced 3 times and the sqlite_free_table had it dereferenced
only two times. Hope the problem can be found because I would like
to start playing around with the include a little more and maybe
use it for something productive.

------------------

IP: Logged

Stan Durham
Member
posted November 22, 2005 10:31 PM     Click Here to See the Profile for Stan Durham     Edit/Delete Message   Reply w/Quote
I found out what was wrong with the code.

There was a problem behind my monitor.

There is nothing wrong with lpTable.

------------------

IP: Logged

Terence McDonnell
Member
posted November 25, 2005 05:13 PM     Click Here to See the Profile for Terence McDonnell     Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Stan Durham:
I found out what was wrong with the code.

There was a problem behind my monitor.

There is nothing wrong with lpTable.



Hey Stan;

Glad you seem to have gotten this resolved; when you say you
figured out what was wrong with the code - is there something
in the original example that I posted that needs to be updated?

Also - in your experience, have you been able to get the "callback"
method of function call to work?

Thanks! - Terence.

------------------

IP: Logged

Stan Durham
Member
posted November 25, 2005 05:50 PM     Click Here to See the Profile for Stan Durham     Edit/Delete Message   Reply w/Quote
Terence,
Thanks for your code.
There’s nothing wrong it.

There was something wrong with my test program.

The beauty of your code is, the table gets released.

I’m afraid to invest the time to try and get the callback working, and then run into table locking problems.
It can be done, I have a driver for another language that does it.
Other drivers leave the table locked.

I might give it a go later on.

------------------

IP: Logged


This topic is 2 pages long:   1  2 

All times are EasternTime (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | PowerBASIC BASIC Compilers

Copyright © 1999-2005 PowerBASIC, Inc. All Rights Reserved.


Ultimate Bulletin Board 5.45c