BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

passing "array of olevariant" to an activex component

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
O. Keller
Guest





PostPosted: Wed Nov 26, 2003 12:39 pm    Post subject: passing "array of olevariant" to an activex component Reply with quote



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





PostPosted: Wed Nov 26, 2003 5:47 pm    Post subject: Re: passing "array of olevariant" to an activex component Reply with quote



< Params = objDS.Parameter(Array(CAM_L_CHANNELS,
CAM_T_STITLE), record, entry)
Quote:


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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.