Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 19 of 19 total
Thread temp tables
Fri, Mar 20 2009 1:18 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

andrej

>ok, can you give an example, since appdo not crash "visually". I use lots of "combobox"
>and I fill them "querries", but all of them are closed before exiting. But them may be
>left open inbetween (alfer filling until next fill).

Sorry I can't - I spend a lot of time getting rid of any I find. The best I can offer is if you send me your code I'll see if I can spot the problem.

Roy Lambert [Team Elevate]
Sat, Mar 21 2009 4:00 AMPermanent Link

andrej
Am I getting this right... those temp files remain there ,because query(-ies) are not
closed properly? Or...?

Roy Lambert wrote:

andrej

>ok, can you give an example, since appdo not crash "visually". I use lots of "combobox"
>and I fill them "querries", but all of them are closed before exiting. But them may be
>left open inbetween (alfer filling until next fill).

Sorry I can't - I spend a lot of time getting rid of any I find. The best I can offer is
if you send me your code I'll see if I can spot the problem.

Roy Lambert [Team Elevate]
Sat, Mar 21 2009 4:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

andrej

>Am I getting this right... those temp files remain there ,because query(-ies) are not
>closed properly? Or...?

The numbered tables are essentially the canned result sets produced by querys. When the query is closed properly part of its actions in closing (or it might be freeing I'm can't remember) is to remove the canned result set. So yes you are getting it right. I don't know of other circumstances when the result set is left around (Tim or others might but I don't).

Normal closing of an app will close and free any querys.

Do you have any threads with querys in?

Roy Lambert [Team Elevate]
Sat, Mar 21 2009 5:19 AMPermanent Link

andrej
No, I don't. Not to my knoledge. I use TMS ColumnComboBox-es for these purposes (jut to
let you know Smile)
it is really strage and annoying


Roy Lambert wrote:

andrej

>Am I getting this right... those temp files remain there ,because query(-ies) are not
>closed properly? Or...?

The numbered tables are essentially the canned result sets produced by querys. When the
query is closed properly part of its actions in closing (or it might be freeing I'm can't
remember) is to remove the canned result set. So yes you are getting it right. I don't
know of other circumstances when the result set is left around (Tim or others might but I
don't).

Normal closing of an app will close and free any querys.

Do you have any threads with querys in?

Roy Lambert [Team Elevate]
Sat, Mar 21 2009 9:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

andrej


You have two basic choices

1. Ignore the problem and occasionally clear the tables away (if you set session.PrivateDir to your Windows temp folder its less annoying)
2. Start working through to find out which query(s) produce the temp files that aren't removed and figure out why.

For 2) a good start point is to use FastMM in debugmode and get a list of any unfreed memory

The offer's open to let me have a look at the source but that's about all I can do.

Roy Lambert [Team Elevate]
Tue, Aug 10 2010 11:10 PMPermanent Link

Rainer Sans

Resfin Services Pty Ltd

Roy Lambert wrote:

andrej


You have two basic choices

1. Ignore the problem and occasionally clear the tables away (if you set session.PrivateDir to your Windows temp folder its less annoying)
2. Start working through to find out which query(s) produce the temp files that aren't removed and figure out why.

For 2) a good start point is to use FastMM in debugmode and get a list of any unfreed memory

The offer's open to let me have a look at the source but that's about all I can do.

Roy Lambert [Team Elevate]

Hi Roy I'm having this problem too and have just sent an email to your Info@ mail address as follows
I am getting the same problem with temporary tables both Dat and Idx as per the forum item “Temp Tables” page 10 of the forum.

In the data module I open all tables and queries in the app and then close the queries and open them again as I need them refreshed by the app to populate combo boxes and teechart graphs.

This appears to have only happened since migration from d2007 to d2009 and from dbisam v4earlier versions  to more recent or latest version 4.29.

These temporary tables appear both on the desktop and inside the “DB” directory under the app development directory.

I’ve tested their creation timing to be whenever the app is started (probably triggered by the data module create code opening all tables and queries and then when the frame they are executed by is created or they are opened or closed using Db.Query.Open; or DB.Query.Close; code. In some cases I’ve used this code to update a total on the After post event on a dataset. In other cases it’s inside the code of an onChange event to update a dbcombobox etc

Is there any recommended code for creation of the queries and or closure of the queries, it only happens on queries as I have been able to get access to the dat files and see exactly which queries they relate to by looking at the output fields. If I use a query to update a total  for a field inside a db lable for example every time a record is updated  new temp dat and idx files are created leaving pages of temp files in the db directory under the app directory and or on the desktop.

This is unsustainable within the applications we are building and almost a show stopper.
This happens either in Win Xp or on win7/vista

At the moment I’m at a loss to know what to do except to use a “while Not Db.Table.EOF Do” code and summarise tables that way. Other toolsets I used in apps are developer express (almost all) and TMS, Raize and zipforge but these have not changed over the years so are not likely to be an issue

Any advice would be appreciated
Regards
Rainer sans
Resfin services Pty Ltd
See www.easytools.com.au for the type of software we are creating
Regards Rainer



Attachments: OpenTables.txt
Wed, Aug 11 2010 4:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rainer

>Hi Roy I'm having this problem too and have just sent an email to your Info@ mail address as follows

Remember I'm not part of ElevateSoft so where did you send it?

>This appears to have only happened since migration from d2007 to d2009 and from dbisam v4earlier versions to more recent or latest version 4.29.

If its uniocode related I won't be able to help since I'm still using D2006

>These temporary tables appear both on the desktop and inside the “DB” directory under the app development directory.

Do you have the PrivateDir set?

>Is there any recommended code for creation of the queries and or closure of the queries, it only happens on queries as I have been able to get access to the dat files and see exactly which queries they relate to by looking at the output fields. If I use a query to update a total for a field inside a db lable for example every time a record is updated new temp dat and idx files are created leaving pages of temp files in the db directory under the app directory and or on the desktop.

Temporary tables are created by queries. They should be deleted by the engine when your app closes if they aren't then there's probably something wrong with your code.

If you use a session component then try closing that when you close the app.

Roy Lambert [Team Elevate]
Wed, Aug 11 2010 2:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rainer,

<< These temporary tables appear both on the desktop and inside the “DB”
directory under the app development directory. >>

If temporary files appears on the desktop, then that means that you haven't
set the TDBISAMSession.PrivateDir in your application.  You must set that to
a valid temporary files directory in order to have the temporary files
created in the proper location.

Also, temporary files won't appear in both places unless a) you're using
more than one TDBISAMSession in your application (possibly including the
"Default" session that is auto-created by DBISAM) or b) you're setting the
TDBISAMEngine.CreateTempTablesInDatabase property to True:

http://www.elevatesoft.com/manual?action=viewprop&id=dbisam4&product=d&version=7&comp=TDBISAMEngine&prop=CreateTempTablesInDatabase

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Aug 11 2010 8:29 PMPermanent Link

Rainer Sans

Resfin Services Pty Ltd

"Tim Young [Elevate Software]" wrote:

Rainer,

<< These temporary tables appear both on the desktop and inside the “DB”
directory under the app development directory. >>

If temporary files appears on the desktop, then that means that you haven't
set the TDBISAMSession.PrivateDir in your application.  You must set that to
a valid temporary files directory in order to have the temporary files
created in the proper location.

Also, temporary files won't appear in both places unless a) you're using
more than one TDBISAMSession in your application (possibly including the
"Default" session that is auto-created by DBISAM) or b) you're setting the
TDBISAMEngine.CreateTempTablesInDatabase property to True:

http://www.elevatesoft.com/manual?action=viewprop&id=dbisam4&product=d&version=7&comp=TDBISAMEngine&prop=CreateTempTablesInDatabase

--
Tim Young
Elevate Software
www.elevatesoft.com
Thanks for the feedback and so quickly
I had not set the temp folder or the engine propoertirs so will do that today.
Your PDF Manual gave me some hints about canned vrs live queries and i set the reslt set to live and the queries to read only and it has fixed my issue for the compiled program for now and the temp tables generated when running the program under the Delphi IDE (as well as the above in future ) should be fixed by your recommendations.

Once again many thanks
Rainer sans
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image