Hi Ken,
Sorry for the delay.
I had tried this and it worked well but that was in Jan 2005. But I never implemented it. Now I don't remember how to register the com component, you may be knowing that.
I have it in 2 parts.
---------------------------------------
1. Create a multi-threaded com server dll.
DEFINE CLASS Executor AS Session OLEPUBLIC
PROCEDURE SqlCommand( tcCommand as String ) as String
local lcReturn
lcReturn = ""
Close Databases all
Set Path To c:\mserver
&tcCommand
If Empty( Alias() ) or Reccount() = 0
Else
SELECT * FROM C:\TEMP1 WHERE RECNO()=1 INTO CURSOR abcd
USE IN TEMP1
CursorToXML( Alias(), "lcReturn", 1, 1 + 8, 0, "1" )
USE IN abcd
endif
Return lcReturn
ENDPROC
ENDDEFINE
This DLL will be registered on Server.
------------------------------------------------------
2. This code will run at clients machine.
Close Databases all
Clear
Local loServer as MServer
Local lcXml as string, lcFilter as String
loServer = CreateObject( "mServer.Executor" )
lcFilter = InputBox( "Filter", "Enter the first letter to search", "B" )
lcXml = loServer.SqlCommand( "select * from MYFILE where NAME like '" ;
+ Alltrim( lcFilter ) +"%'" + "into table c:\mserver\temp1")
If Empty( lcXml )
* Noting to do
Else
** XMLToCursor( lcXml, "Results" )
USE C:\MSERVER\TEMP1
Browse last
endif
-----------------------------------------------------
I am sure this will help. I have not found the original article.
> > Ken,
> >
> > I last tried it in Jan 2005.
> > I have searched my computer, but I have not yet found it. But I am sure I have it on my old hard disk. I also have the code with which I implemented it. I will find it as soon as possible.
> >
> >
> >
>
> If you can find it, I would be most grateful.
>
> Ken
> You shall know the truth - and the truth shall set you free. (John 8:33)