Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Its too late for VFP 7 - but suggestions for VFP 8
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00522770
Message ID:
00522986
Views:
5
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.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform