Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving the DBC name in a SP
Message
From
21/04/2005 10:32:25
 
 
To
21/04/2005 09:49:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01006870
Message ID:
01007004
Views:
22
Cetin,

The documentation of the USE command says that when not using a database name, only tables in the current database could be opened. This may not always be true, so I did a test :
PROCEDURE whoami
	OPEN DATABASE d:\fl\foxpro\training\donnees\test_data.dbc
	SET DATABASE TO test_data
	USE parent IN 0 AGAIN ALIAS temp
	? "The procedure's database is "+CURSORGETPROP('database','temp')
	USE IN temp
	SET DATABASE TO test_data
	USE toto IN 0 AGAIN ALIAS temp
	? "The procedure's database "+CURSORGETPROP('database','temp')	
	USE IN temp
ENDPROC
This procedure belongs to the database test_getdbc.dbc, having two tables parent and toto. toto is to be found only in test_getdbc, while parent can be found in the databases test_getdbc, test_data and test_integrity, a third database that I had open before running the test.

The first part returned the path to test_integrity, the second part failed. I may have misunderstood your solution. Where did I go wrong ?
Of course it would certainly have worked if I had given the full path to the tables, but this uses as much information as writing down the dbc path itself.

David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform