>Ok, don't laugh. I have a Fox application that uses sys(2015) to create unique keys.
>
>I would like to create a small utility application in VB that acts upon this Fox data, but I need to know if there is a way to simulate the sys(2015) function. Any ideas?
>
>I suppose if someone can suggest any function, that will return a unique 10 character string, I could substitute this for the sys(2015) call.
Since MS didn't publish the algorithm anywhere, it's a bit tough to know. There are at least two options available, although both have a certain cost in overhead:
(1) Create an in-process server with VFP that has a method that invokes SYS(2015) and returns the value, or
(2) Use the Visual FoxPro FPOLE.DLL's FoxEval() API call or the Visual FoxPro Automation Object VisualFoxPro.Application EVAL() method to return the value of SYS(2015). VB should be able to access either.
In all cases, this will use VFP's runtime to get the SYS(2015) value, so it will use the same mechanism you've come to love in VFP.