Home All Groups Group Topic Archive Search About

Assign property from db to object property?

Author
28 Jan 2006 7:10 PM
Burt
I have a large number of name/value pairs in a database I want to loop
through and assign the value to an object with the property of that
name. Pseudocode would be:

while oRec.Read
  myObject.oRec("PropertyName") = oRec("PropertyValue")
loop

Is there any way to this? Many thanks for any help.

Burt

Author
30 Jan 2006 12:35 PM
Chris Petchey
Look at the CallByName function



In message <1138475403.417522.214***@g49g2000cwa.googlegroups.com>, Burt
<burt_5***@yahoo.com> writes
Show quoteHide quote
>I have a large number of name/value pairs in a database I want to loop
>through and assign the value to an object with the property of that
>name. Pseudocode would be:
>
>while oRec.Read
>  myObject.oRec("PropertyName") = oRec("PropertyValue")
>loop
>
>Is there any way to this? Many thanks for any help.
>
>Burt
>

--
Chris Petchey
Author
7 Feb 2006 10:33 PM
Burt
That did it, thanks.

Burt

Chris Petchey wrote:
Show quoteHide quote
> Look at the CallByName function
>
>
>
> In message <1138475403.417522.214***@g49g2000cwa.googlegroups.com>, Burt
> <burt_5***@yahoo.com> writes
> >I have a large number of name/value pairs in a database I want to loop
> >through and assign the value to an object with the property of that
> >name. Pseudocode would be:
> >
> >while oRec.Read
> >  myObject.oRec("PropertyName") = oRec("PropertyValue")
> >loop
> >
> >Is there any way to this? Many thanks for any help.
> >
> >Burt
> >
>
> --
> Chris Petchey