Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VT_ARRAY in VFP
Message
From
07/08/1996 18:25:36
John Little
Ferguson Information Systems
Irving, Texas, United States
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00005148
Message ID:
00005245
Views:
27
>VT_ARRAY denotes a safe array Variant type used with OLE Automation. Using Windows API, you're supposed to access OLE variant array using Data Manipulation function ssuch as SafeArrayAccessData(), etc.
>
>Under VFP, you can pass array structures to OLE objects' methods, but only by reference (prefixed with @ character). You're also limited to up to two-dimensional arrays only.
>
>You can also receive OLE Variant arrays as the return values of functions.
>Search under VFP Help, "Using Arrays of OLE Objects" for sample code.
>
>HTH!

Thank Alistair, however the function I'm calling looks like this

short GetColumnHeadings(long QueryID, VARIANT *Headings)

This functions returns the column headings (also referred to as column names).

Example:

Stat = Shuttle.GetColumnHeadings(QueryID, ColHeadings)


Parameters

1. QueryID
The ID of the query, as returned from InitializeQuery().

2. ColHeadings
A pointer to a VARIANT in which the result will be stored. The result is an array of strings (variant type VT_ARRAY | VT_BSTR) containing one string for each column heading.
Note: The VARIANT must be properly initialized before calling this function. Visual Basic does this automatically; Visual C++ programmers should call VariantInit().

Return Value

integer variable 0 for ok -1 for failed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform