Populate text box from recordset

T

Teo

Hi!
I'm querying Active Directory using ADO, OLE DB for AD.
I CAN get the recordset back and can loop through it. I want to display
these records in a subform in datasheet view. I DID it too. BUT there is a
field in the recordset which is an array of variants, so it CAN NOT be put
in the ControlSource property of a text box. How can I display it too?
Please advise what to do!
 
J

Jonathan Parminter

-----Original Message-----
Hi!
I'm querying Active Directory using ADO, OLE DB for AD.
I CAN get the recordset back and can loop through it. I want to display
these records in a subform in datasheet view. I DID it too. BUT there is a
field in the recordset which is an array of variants, so it CAN NOT be put
in the ControlSource property of a text box. How can I display it too?
Please advise what to do!
Hi Teo, have you considered assigning this array to a
listbox?

Luck
Jonathan
 
T

Teo

Hi,
yes, I have. But the result should be in datasheet view, one record on a
line. Moreover this array contains one item only, I can't catch the reason
why array returned, I expect text information, as it is the Description
field for an Active Directory user.
 
D

Dan Artuso

Hi,
I have no idea HOW you're doing things, but when I want array elements
displayed as a string, I simply loop through the array, concatenating each element
into a string variable and then display that in a text box
 
T

Teo

Hi,
I'm looping through the array. But it's not enough. First I made a creatable
recordset which is a new feature in ado
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html
/daotoadoupdate.asp). It's an empty recordset built from fields. And then I
looped through the recordset returned by the provider and assigned values to
the fields in the empty recordset. Finally the resulting recordset will
contain valid string values for putting it under a form. Converison problems
are away. Works fine.
Thanks to all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top