Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Invalid subscript reference.' message when calling obje
Message
From
06/03/2003 17:34:32
 
 
To
06/03/2003 17:30:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00762479
Message ID:
00762497
Views:
14
This message has been marked as the solution to the initial question of the thread.
Margaret,

The Connect2SQL() method should be called from within a method of the objDataType class, such as the init(). See below...

>Here's the code I run from the command line
>
>
>public goapp
>goapp = newOBJECT("appmanager","appmgr.fxp")
>set proc to objdatatype additive
>oDataType = createOBJECT('objDataType')
>
>
>The 'invalid subscript reference' pops up on the 3rd line shown below when the objdatatype tries to go to goapp.
>
>
>DEFINE CLASS ObjDataType AS CUSTOM
>    lnConn = 0
     procedure init
>        this.lnConn = goApp.Connect2SQL('CHROMM')
     endproc
...
enddefine
>
>
>If I run the exact same line from the command prompt I get a positve value in lnConn (I have an sqlconnection) and no error message.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform