>Every time the code is run I should get 0 back which mean it has succeeded, the first time the code is run in VFP7 it works OK but after that it always returns an error. As mentioned the same code works fine in VFP5.
What is the error being returned exactly? Also, is the VFP 7 version running in the same environment as the VFP 5 version?