Jess,
In the first example, you never really create the variable. LOCAL doesn't create the variable as the specified type; it only creates a variable of type logical. There is also no NEW keyword in VFP as there is in VB that creates and initializes the variable to the type specified.
The AS clause was added to the LOCAL and PUBLIC declarations for intellisense only. When these commands create the variable, something in VFP is keyed to know what this variable is supposed to be and the appropriate type library is read and displayed at the appropriate times.
HTH.
>Craig,
>
>What am I missing here??
>
>In the INIT method of the form,
>
>LOCAL oObj AS ADODB.CONNECTION
>oObj.OPEN("bbfsdsn","sa","")
>oObj.CursorLocation = 2
>
>This one does not work at runtime although intellisense popups during development time and within init only. Meaning, oObj. has no more intellisense popup in other methods.
>
>oObj = CREATEOBJECT("ADODB.CONNECTION")
>oObj.OPEN("bbfsdsn","sa","")
>oObj.CursorLocation = 2
>
>This one works, but no intellisense available in any method.
>
>Please educate me.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao