 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
O. Keller Guest
|
Posted: Wed Nov 26, 2003 12:39 pm Post subject: passing "array of olevariant" to an activex component |
|
|
hi,
I try to pass a variant array to an activex component. According to the
documentation
the following vb - example should work:
Dim Params As Variant
Dim record As Long
Dim entry As Long
....
Params = objDS.Parameter(Array(CAM_L_CHANNELS, CAM_T_STITLE), record, entry)
How can I pass the values CAM_L_CHANNELS and CAM_T_STITLE to the component
with delphi ?
------------------------------------------
I tried it with the following delphi-code (but at runtime I get an
type-conflict-error when I try to access the CamDatasource1.Parameter -
property) :
var
vParameter : OleVariant;
Codes : OleVariant; //array of TVarRec; // array of
OleVariant;
Record_ : Integer;
Entry : Integer;
begin
Codes := VarArrayCreate( [ 0, 1 ], varInteger);
Codes[0] := CAM_L_CHANNELS; // CAM_L_CHANNELS = $20000007;
Codes[1] := CAM_T_STITLE; // CAM_T_STITLE = $20010002;
Record_ := 1;
Entry := 1;
vParameter := CamDatasource1.Parameter [ Codes, Record_, Entry ];
....
end;
thanks in advance !
|
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Wed Nov 26, 2003 5:47 pm Post subject: Re: passing "array of olevariant" to an activex component |
|
|
<
Params = objDS.Parameter(Array(CAM_L_CHANNELS,
CAM_T_STITLE), record, entry)
Does
vParameter := CamDatasource1.Parameter(
VarArrayOf([CAM_L_CHANNELS, CAM_T_STITLE]),
Record_, Entry);
work?
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|