The following example, run from within Visual FoxPro, creates a second instance of Visual FoxPro. The Customer table is opened in the second instance of Visual FoxPro.
An array containing data from the Customer table is created in the first instance of Visual FoxPro, and the contents of the array is displayed. The array contains data from the first 5 records in the Customer table. The second instance of Visual FoxPro is then closed.
oNewInstance = CREATEOBJECT('VisualFoxPro.Application')
oNewInstance.DoCmd "USE (HOME(2) + 'Data\Customer')"
aCustomerArray = oNewInstance.RequestData('Customer',5)
DISPLAY MEMORY LIKE aCustomerArray
oNewInstance.DoCmd('QUIT')