PC Review


Reply
Thread Tools Rate Thread

Assign property from db to object property?

 
 
Burt
Guest
Posts: n/a
 
      28th Jan 2006
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

 
Reply With Quote
 
 
 
 
Chris Petchey
Guest
Posts: n/a
 
      30th Jan 2006
Look at the CallByName function



In message <(E-Mail Removed)>, Burt
<(E-Mail Removed)> 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
 
Reply With Quote
 
Burt
Guest
Posts: n/a
 
      7th Feb 2006
That did it, thanks.

Burt

Chris Petchey wrote:
> Look at the CallByName function
>
>
>
> In message <(E-Mail Removed)>, Burt
> <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a object property inside another object property -- pleassehelp!! almurph@altavista.com Microsoft C# .NET 1 12th Feb 2009 02:25 PM
Binding to property of property of object collection TS Microsoft ASP .NET 3 31st Aug 2006 01:57 PM
DataBinder.Eval for an object's property property... like Eval(Container.DataItem,"Version.Major") Eric Newton Microsoft ASP .NET 3 4th Apr 2005 11:11 PM
Unable to assign value to a property Hon Yuen, Ng Microsoft VB .NET 1 12th Mar 2005 08:19 AM
DirectShow: Cannot assign Filename property of Dexter MediaDet object Hartmut Schroth Microsoft VB .NET 3 18th Dec 2003 05:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.