Data Access Worldwide Knowledge Base

Article ID 2206
Article Title INFO: Restructuring non-DataFlex Tables in Database Builder
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2206
KBase Category CONNECTIVITY KITS
Date Created 01/20/2006
Last Edit Date 06/30/2006


Article Text
Reestructuring a non-DataFlex table is a different process than restructuring a DataFlex table.

To change a DataFlex table structure we use Database Builder and open the tble "exclusive". That will prevent any other instance of the table to be opened -- i.e. no other application can open that table. This is not true for non-DataFlex tables; the tables are not locked as DataFlex tables are.

Yes, other applications can access the a non-DataFlex table while it is open "exclusive" in Database Builder. But other applications can also access the non-DataFlex table while it is in "Design Mode" in its native backend tools -- e.g. SQL Server Enterprise Manager.

In order to avoid other applications to access the table we need to restructure, the database administrator should block access to that object until he is done - he can deny access to the whole database at once if he needs to and disconnect all users connected to it - and then release the object so users can access it again.

When you use Database Builder to restructure (i.e. add a new field, change an existing field, create a new index, etc.) a non-DataFlex table, Database Builder changes the structure of the table in the backend database but it doesn't block access to the object while doing so - just like Enterprise Manager.

In that case, the application user still uses the cache (CCH) file to get the current table structure and that could end up in an error - a column missing or something - after the new structure is in place. In order to avoid things like that from happening, the dba needs to block access to the table prior to changing the table structure and then delete the existing CCH file (*).



(*) When using Database Builder to restructure tables, all the intermediate (.INT) files get automatically updated with the necessary information and, if you use cache (.CCH) files, the CCH files will automatically be regenerated.

If the structure change is performed using one of the tools provided by the backend, the INT files are not updated and the CCH files are not regenerated. In this case, we need to manually update the INTs and delete the CCHs so they are recreated when the next "open file" is executed.




Contributed By:
Marcia Booth
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.