-
July 1st, 2009, 05:07 AM
#1
[RESOLVED] _variant_t
Hi all
i have a _variant_t (SAFEARRAY) variable which have some data.
Code:
_variant_t data = rs->GetRows(adGetRowsRest);
_variant_t data have some values like
Code:
[0,0] = BSTR = 0x0017a67c "info"
[0,1] = BSTR = 0x0017a6fc "med"
...
How can i read _variant_t (SAFEARRAY) data one bye one and store in CString? or How can i convert _variant_t (SAFEARRAY) to CStringArray.
Plz help me
-
July 1st, 2009, 07:07 AM
#2
Re: _variant_t
i am waiting for some suggestion or idia.
-
July 1st, 2009, 07:20 AM
#3
Re: _variant_t
Use SafeArrayGetElement and other set of SafeArray* functions.
Do not have any example code, see documentation in MSDN or search for code over Internet.
-
July 1st, 2009, 07:23 AM
#4
Re: _variant_t
Please, provide a little more clear decription of what you are doing and what you need.
And, BTW, GetRows returns two-dimensional array, so how are you going to save its elements in one-dimensional CStringArray?
Victor Nijegorodov
-
July 1st, 2009, 07:46 AM
#5
Re: _variant_t
Originally Posted by VictorN
Please, provide a little more clear decription of what you are doing and what you need.
And, BTW, GetRows returns two-dimensional array, so how are you going to save its elements in one-dimensional CStringArray?
ok
useing GetRows i am getting all name of mysql database.And now i need to add these name in lisbox. so i am try to convert _variant_t to CString.If you have any different idia then plz give me.
Last edited by Msm; July 1st, 2009 at 07:48 AM.
-
July 1st, 2009, 07:53 AM
#6
Re: _variant_t
Have a look at the code example in this KB article
Victor Nijegorodov
-
July 2nd, 2009, 04:35 AM
#7
Re: _variant_t
Originally Posted by VictorN
Have a look at the code example in this KB article
Thanks victorn.Your ans always help me..Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|