Showing posts with label Database Container. Show all posts
Showing posts with label Database Container. Show all posts

Modify database table outside the database will cause field name to be truncated

Tables within the database container can use field names longer than 10 characters while free table cannot use field names longer than 10 characters. Therefore, if you use Modify Stru command to modify the tables outside the database container, Visual Foxpro will truncate the field names longer than 10 characters to 10 characters when you save the table. This will cause your program to hit runtime error because the field cannot be found by the program anymore.

Therefore, when you want to modify tables that are attached to database, make sure you open it and modify it within the database. Do not modify it as it is a free table.

What is the advantages of using Database container compared to free table.

With database container, you can have the following features which do not available in free table:
1) Referential integrity
2) Table's relationship
3) Long table and field names
4) Default values