Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Invalid subscript reference.' message when calling obje
Message
De
06/03/2003 17:34:32
 
 
À
06/03/2003 17:30:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00762479
Message ID:
00762497
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform