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 

Variant! Variant! Variant! Variant! Variant!

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Dmitry Konnov
Guest





PostPosted: Thu Mar 24, 2005 6:29 am    Post subject: Variant! Variant! Variant! Variant! Variant! Reply with quote



Hello,

I need to pass array of parameters from client to server.
I use Variant for transport.

My method returns Variant.
And in this Variant there are array of elements there.

This is the way i create the array:

Variant a_Array[2];
a_Array[0] = a_MemTable->AllData;
a_Array[1] = a_Val;
return VarArrayOf(a_Array, 2);

Compilation goes well.

But i cannot get back the array elements.

Variant a_Res = MyMethod();

a_LacalMemTable->AllData = a_Res[0];
int a_Val = a_Res[1];

Compiler curses for []
It says

Variant::operator[](const int) is not accessible


Please help.
Thank in advance.

Dmitry Konnov


Back to top
Mark Guerrieri
Guest





PostPosted: Thu Mar 31, 2005 10:29 pm    Post subject: Re: Variant! Variant! Variant! Variant! Variant! Reply with quote



Quote:

Variant a_Res = MyMethod();

a_LacalMemTable->AllData = a_Res[0];
int a_Val = a_Res[1];

Compiler curses for []
It says

Variant::operator[](const int) is not accessible


Try:

a_LacalMemTable->AllData = a_Res.GetElement(0);
int a_Val = a_Res.GetElement(1);

Mark



Back to top
Dmitry Konnov
Guest





PostPosted: Fri Apr 01, 2005 6:24 am    Post subject: Re: Variant! Variant! Variant! Variant! Variant! Reply with quote




Hi Mark,

Quote:
Try:

a_LacalMemTable->AllData = a_Res.GetElement(0);
int a_Val = a_Res.GetElement(1);

Yes, thank you.

Do you use Builder?

Dmitry



Back to top
Mark Guerrieri
Guest





PostPosted: Fri Apr 08, 2005 6:02 pm    Post subject: Re: Variant! Variant! Variant! Variant! Variant! Reply with quote

BCB6 Ent

"Dmitry Konnov" <dmitry (AT) weblinedesign (DOT) biz> wrote

Quote:

Hi Mark,

Try:

a_LacalMemTable->AllData = a_Res.GetElement(0);
int a_Val = a_Res.GetElement(1);

Yes, thank you.

Do you use Builder?

Dmitry





Back to top
Dmitry Konnov
Guest





PostPosted: Sat Apr 09, 2005 6:16 pm    Post subject: Re: Variant! Variant! Variant! Variant! Variant! Reply with quote

Mark,
BCB6 Ent
me also.
please drop me a line to my email
Dmitry


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier) 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.