Post by RobNo it did not work if I try and add a table to to another DBC it still
spits the dummy.
I did not talk about adding a table to another
database, I talked about adding the databse to
a project. And I talked about the EXCLUSIVE
setting.
her's an example, which shows you can have
the same database in different projects:
#define ccBasedir "d:\shareddatabasetest\"
Set Exclusive Off
MkDir (ccBaseDir)
MkDir (ccBaseDir+"database\")
MkDir (ccBaseDir+"project1\")
MkDir (ccBaseDir+"project2\")
Create Database (ccBaseDir+"database\shared.dbc")
Close Databases
Create Project (ccBaseDir+"project1\project1.pjx") nowait save
_vfp.ActiveProject.Files.Add(ccBaseDir+"database\shared.dbc")
_vfp.ActiveProject.Close()
Create Project (ccBaseDir+"project1\project2.pjx") nowait save
_vfp.ActiveProject.Files.Add(ccBaseDir+"database\shared.dbc")
_vfp.ActiveProject.Close()
Modify Project (ccBaseDir+"project1\project1.pjx") nowait
Modify Project (ccBaseDir+"project1\project2.pjx") nowait
Now you talk about adding a table. Adding a table needs exclusive
access to a database, so now if two projects are open and
the database is already opened shared, you can't add a table,
true. So pick the database in the project manager treeview and
click on Close to close the database.
Then set exclusive on and open the database in one of the
projects and you can add tables.
It's possible to add a database to several projects and to
have these projects opened parallel. But what I suggest is
to not do so anyway, even that is not the problem, the
handling may not be intuitive and you need to know what
you're doing and what opens the database and what closes
it. CLOSE DATABASE in the command window may not
be enough, if that database node is open, the project manager
keeps the database open and you may not get it exclusive
as easy as you think.
So what I'd suggest is, don't add the database to the projects,
because you'll want to keep that excluded from the EXEs
anyway.
Instead make a third project only containing the database. Now
the problem of projects tending to have their associted database
open as long as the treeview is open from the database node
is no problem anymore, because there is only one project
containing the database.
Maybe this made it clearer.
Bye, Olaf.