Hans,
With createobject() it is not important that the VCX containing the class is in path or not. The VCX might be in your current folder, still it would give the same error. VFP doesn't search the vcx'es in search path for definitions, instead it checks the 'open' class libraries (set classlib to ....). While Set ClassLib would open a library and have its classes ready for createobject(), I strongly suggest using NewObject() instead.
With CreateObject("SomeClass") VFP would search the open class libs and create the object if it finds. However, if more than one class library have a definition for 'SomeClass' then there is no way that you can explicitly specify which one you are referring to.
With NewObject() -which is historically newer in the language- you can specify which class library to use (and it doesn't need to be in search path, you could directly write the full path). ie:
Visual Fox Pro
oListgrid = NEWOBJECT("locatorgrid", "d:\databases\class libraries\foxyclasses\classes\grids.vcx" )
For setting up cSQL you could do that in code too like this:
Visual Fox Pro
with thisform.locatorgrid1
.cSQL = complsqlcurs.myDefinition
.init()
endwtih
Calling init() code is important.