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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When I open dbf in command window i 2

Status
Not open for further replies.

sashaDG

Programmer
Jun 20, 2022
112
BY
When I open dbf in command window it opens in shared mode. When I create a table, I can add fields, but I can't add comments and input conditions. Im tried SET EXCLUSIVE. After i restarted my computer, it did work. It seems the issue is resolved, but I don't want to restart the computer every time in this situation))

What to do to add comments and another? Thx
 
If you open a table by typing USE <tablename> in the command window, it will open in shared mode by default. You can change that by ticking the "Open exclusive" box in Tools / Options / Data. That will change the default for the current session. To make it the default for future sessions, click Set As Default in the Options dialogue. You can also add the keywords SHARED or EXCLUSIVE to the USE command.

If you open a table from the project manager or the database designer, it will always open exclusively.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I cant change in Display, Field validation, Map field, AutoIncrement, F.commnet because table not in database?
 
If the table is not in a database, then those settings will not be available. A table that is not in a database is a "free table", and free tables don't support any of the properties shown in the right-hand side of the Table Designer (Format, Input Mask, Caption, Validation, Map fields, Comment, etc.)

The reason for this is to maintain backward compatibly with earlier versions FoxPro. If you want to take advantage of those properties, you will have to place the table in a DBC.

That said, some developers say that they rarely use those properties. The only ones that I regularly use are Autoincrement and Field comment. But DBC-bound tables also support long field names, which for me is often the deciding factor.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Glad to have been of help, Sasha.

I made a small mistake in my previous post. Autoincrement settings (Next Table and Step) are in fact available for free tables - but only if the table actually contains a field of type Integer (Autoincrement). None of the other properties are available.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top