Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 17 of 17 total
Thread .lck files and paths configuration
Thu, Feb 14 2008 5:25 PMPermanent Link

Mark Wilsdorf
But Eduardo,

Malcom's post early in this thread said:  "Use the Database.Session.PrivateDir to say
where the .lck file should
be created.  Otherwise whenever it is needed it will be created in the current working
directory."

And Tim's reply was:  "Malcolm's answer is spot-on and very complete."

Also the dbisam documentation states Session.PrivateDir determines where .lck files get
placed...unless I've read it wrong.

Mark Wilsdorf
Fri, Feb 15 2008 4:05 AMPermanent Link

"Jose Eduardo Helminsky"
Mark

Maybe I misunderstanding something but...

1) .lck file will be create when you open a table. The path it will create
is the path where table is located

2) *IF* DBISAM needs a temporary data (for any operation), then it will
create/open tables in session.privatedir and therefore will create a .lck
file too

I am pretty sure about that.

Eduardo

Fri, Feb 15 2008 4:17 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Mark

It should work that way. It does for me. A couple of thoughts

1. If you open the tables in the IDE the Session.ProvateDir won't be set so the .lck will go where the tables are
2. Delete all the dbisam.lck files from your PC and then try (you might have some left over from 1 above)

Roy Lambert
Fri, Feb 15 2008 5:59 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< Malcom's post early in this thread said:  "Use the
Database.Session.PrivateDir to say where the .lck file should
be created.  Otherwise whenever it is needed it will be created in the
current working directory." >>

Some clarification is in order here.  In Luis's original post, he was
referring specifically to the .lck files created for *temporary tables*
only.   Any database directory where tables are created will result in a
..lck file being created in that same directory, so you can have a .lck file
in the main database directory also *in addition* to the private directory,
where only temporary tables are stored.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Feb 15 2008 8:55 AMPermanent Link

Mark Wilsdorf
Thanks Tim (and everyone else) for the clarifications & help.

Mark Wilsdorf
Flagship Technologies, Inc.
QuickBooks™ Add-Ons and Solutions You Can Use
http://www.goflagship.com
Tue, Feb 17 2009 10:54 AMPermanent Link

Joel Schaubert
Found this thread after having problems with dbisam.lck files showing up in the
applications default directory instead of the database directory.

The tips in the thread are correct.

My original code as shown below was causing a dbisam.lck file to appear on the execution
of the AlterTable command.
This happened even though several previously run create table commands already executed
   had made the dbisam.lck file down in the correct subdir.  So AlterTable was behaving
differently than create table.


   TDBISAMTable *OptionsTable=new TDBISAMTable(Application);
   OptionsTable->DatabaseName=DatabasePath;
   OptionsTable->TableName="options.dat";
   OptionsTable->Close();  //just to make sure
   OptionsTable->Exclusive = true;
   OptionsTable->FieldDefs->Update();
   OptionsTable->FieldDefs->Delete(1);
   OptionsTable->FieldDefs->Insert(1,2,"IMPFILENAM",ftString,250,false,"","","","");
   OptionsTable->FieldDefs->Delete(12);
   OptionsTable->FieldDefs->Insert(12,13,"TEMPDIR",ftString,250,false,"","","","");
   OptionsTable->IndexDefs->Clear();
   OptionsTable->AlterTable(0,1,sver);
   OptionsTable->Close();
   OptionsTable->Exclusive = false;


Adding this line of code  (where the DBISAMSession1 already had its privatedir setup
correctly) fixed the issue

   OptionsTable->SessionName = Form1->DBISAMSession1->SessionName;


Joel
Tue, Feb 17 2009 1:25 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Joel,

<< Adding this line of code  (where the DBISAMSession1 already had its
privatedir setup correctly) fixed the issue

   OptionsTable->SessionName = Form1->DBISAMSession1->SessionName; >>

Yep, you need to make sure that you've got the table component hooked up to
the correct session, otherwise you will end up using the default session,
which may or may not have its PrivateDir property set properly.

--
Tim Young
Elevate Software
www.elevatesoft.com

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image