Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Table in use" problem

Status
Not open for further replies.

Guthro

Technical User
Sep 9, 2006
107
GB
Hi.
I'm trying some basic stuff with 3 paradox tables and some basic dbedit components. I'm frightened how much I've forgotten.
Anyway, with both Delphi 5 running and database desktop open, I want to restructure the P7 tables. I get the old favourite error of "Can't restructure table, table in use".
How can I get in and restructure a table without closing my whole app down simply to release the table ?

My Feeblegirl.com Forum boards for mmorpgs, sport, fun, politics...
 
you should be able to just make the table = not active in the app. i've not tried this because i havent had call to edit the structure while running the app.
 
I set the table Active to false in the object inspector but it still doesn't allow it.
Thanks for the reply.

My Feeblegirl.com Forum boards for mmorpgs, sport, fun, politics...
 
i use dbisam and it has a "keep connected" property that keeps the table locked regardless of the active property.

maybe somthing like that is happening to you.

try Table1.Database.KeepConnection:=false;

Aaron
 
I've used SQL, altering columns or creating the table structure, etc., and then creating the TTable component. Worked fine, but there's no doubt a much easier solution.

Getting answers before I'm asked.
Providing answers if I can.
 
I've run into this with D5 & D7 and Paradox tables. It appears to me that once you get that message, (while trying to restructure with opened tables) it becomes persistant, even after the tables are closed, whether in your app or in the IDE. The only way I've been able to clear it, is to shut down Delphi and restart it.

Look for PARADOX.LCK and PDOXUSRS.LCK in you defined Database folder. If you can delete these without a sharing violation, then you can restructure.

There is a free dos utility you can download from Borland's site that addresses this issue, but the above (2) methods are just as easy in my opinion.

HTH

Roo
Delphi Rules!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top