Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem when move Free Tables
Message
From
11/03/2003 21:31:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem when move Free Tables
Miscellaneous
Thread ID:
00764567
Message ID:
00764567
Views:
59
Hi all,

I use this code(Erik Moore Code) to change the path's of DE Database, it works with databases but not with free tables in DE.
LOCAL ARRAY laList[1]

*** Get Object Members of DE
=AMEMBERS(laList, THISFORM.DATAENVIRONMENT, 2)
IF EMPTY(laList[1])
	*** Nothing in DE
	RETURN
ENDIF

IF ALEN( laList,1 ) > 0
	FOR i = 1 TO ALEN(laList,1 )
		loObj =  EVAL("ThisForm.DataEnvironment."+laList[i])

		IF LOWER(loObj.BASECLASS ) = 'cursor' AND "\"$loObj.DATABASE
			IF !EMPTY(loObj.DATABASE)
				*** Contained Table
				lcDBC = SUBSTR(loObj.DATABASE, RAT('\', loObj.DATABASE))
				loObj.DATABASE = tcNewDataPath + lcDBC
				IF !DBUSED(loObj.Database)
					OPEN DATABASE (loObj.Database)
				ENDIF
				SET DATABASE TO (loObj.Database)
			ELSE
				*** Free Table
				WAIT WINDOW 'OPEN FREE TABLE'
				lcDBC = SUBSTR( loObj.CursorSouce, RAT('\',loObj.CursorSouce))
				loObj.CursorSouce = tcNewDataPath + lcDBC
			ENDIF
		ENDIF
	NEXT
ENDIF
Any comments,

João
Next
Reply
Map
View

Click here to load this message in the networking platform