>There is no magic. VFP COM components cannot "see" VFP cursors in other data sessions or other components. I still do not see what the big deal is. Follow this scenario:
JVP,
I understand what he is saying, and agree... for example, I have the following class...
define class TestServer as custom olepublic
function ReplaceAll( cAlias )
Select ( cAlias )
Replace All Field1 with 'AAA'
Return .t.
EndFunc
enddefine
In the command window I do the following:
Use Table1
oX = createobj('TestServer.TestServer')
? oX.ReplaceAll( alias() )
I get an OLE error:
OLE IDispatch exception code from testserver.TestServer
testserver.TestSErver: .replaceall c:\vfp\testserver.prg Error
in Line 12 Alias 'TABLE1' not found. 177..
Why is it, that VFPCOM.DLL can seem to access the alias passed to it? How does it do this? This is not something you can seem to do in VFP COM objects that you create. While it may not be magic, it is certainly not standard VFP.
BOb