Hello, All!
Could someone explain to me how to pass arguments of VARIANT data type? For example, the method Open of the Recordset object has this prototype in IDL:


HRESULT Open(
[in, optional] VARIANT Source,
[in, optional] VARIANT ActiveConnection,
[in, optional, defaultvalue(-1)] CursorTypeEnum CursorType,
[in, optional, defaultvalue(-1)] LockTypeEnum LockType,
[in, optional, defaultvalue(-1)] long Options);

How to pass the first argument and the second one?
Posted on 2001-08-28 00:37:55 by vkim
i know the datatype VARIANT only from vb. it can be whatever you want (in vb). i think you would have to try out different, but actually you've only to "logical" possibilities: DWORD or BYTE (string).

NOP-erator
Posted on 2001-08-28 09:35:50 by NOP-erator
its right, that the variant comes from Visual Basic,
you can find the definition of the structure in the
oaidl.inc include file.

You must fill the vt entry with the type, f.e.
VT_BSTR or VT_UINT and the corresponding DWORD
entry in the struct, f.e. "intVal" or "bstrVal".

Main question stays open - which input needs the Open()
function - handle or value or string?
Posted on 2001-08-28 14:23:30 by beaster
First & second pars probably results other functions so its can be strings or integers and so on. Fact of the matter is that this pars can have type VT_BSTR or VT_UINT and any other type.
Posted on 2001-08-28 15:32:05 by Alexey
I want to use ADO in my asm program, not in VB one. Thanks a lot for the replies but has anybody an appropriate example?
Posted on 2001-08-28 22:44:34 by vkim
There is an asm ADO example at: http://www.com4me.net
Posted on 2001-08-28 23:40:23 by bitRAKE