Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateObject and NewObject not working on workstations
Message
From
28/07/2009 16:18:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/07/2009 15:11:58
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01415148
Message ID:
01415168
Views:
126
This message has been marked as a message which has helped to the initial question of the thread.
>I have a class (sqlclsss.vcx) included in my executable that I instantiate the object like this:
>
>
>SET CLASSLIB TO sqlclss ADDITIVE
>lcSqlConfgConn = 'oConn'+TRIM(sqlconfg.product)  && example would be 'oConnFire'
>&lcSqlConfgConn = CREATEOBJECT("SQLCLSS.SQLPROC")  && sqlproc has methods and properties  <  -- ERROR HERE
>
>
>The class is included in the executable and it works on my development machine, but not on the client's. any ideas why? It returns a bad command verb error.
>
>NEWOBJECT() fails as well with the 'Unrecognized command verb' error.

It seems the variable on the left doesn't exactly contain a valid variable name. Can't you wrap this in a try-endtry and log all the properties of the exception object? Also, log the contents of lcSqlConfgConn just to make sure that it contains what's inside.

The other possibility is that the COM object has some error inside itself, or that the error is actually bogus. Someone correct me if I'm wrong, but the "library.class" syntax in createobject() is reserved for COM objects - if you're instantiating from your included class, you should have just the class name.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform