Hi Everyone,
I am wanting to know if it is possible to build a custom object /
class 'on the fly'. I am hoping to create a class that has elements
for each field in a recordset - wihtout knowing the fields before
retreiving the recordset. I would then use a collection of these
objects to 'pool' the data. The reason behind this is that I am
pulling data from multiple sources, and not all of them are known
beforehand.
At the moment I am using arrays to do the job of holding the data (in
a collection), and a separate collection of arrays that holds the
recordsets' definitions (name, type, definedsize). I would prefer to
do this with 'objects' but I am guessing I can only do this if I know
the definitions beforehand.
Any thoughts are appreciated.
Cheers
The Frog
|
|
0
|
|
|
|
Reply
|
The
|
3/19/2010 10:29:22 AM |
|
On Fri, 19 Mar 2010 03:29:22 -0700 (PDT), The Frog
<mr.frog.to.you@googlemail.com> wrote:
This has already been built for you: a DAO.Recordset object has a
Fields collection. Would that do it?
-Tom.
Microsoft Access MVP
>Hi Everyone,
>
>I am wanting to know if it is possible to build a custom object /
>class 'on the fly'. I am hoping to create a class that has elements
>for each field in a recordset - wihtout knowing the fields before
>retreiving the recordset. I would then use a collection of these
>objects to 'pool' the data. The reason behind this is that I am
>pulling data from multiple sources, and not all of them are known
>beforehand.
>
>At the moment I am using arrays to do the job of holding the data (in
>a collection), and a separate collection of arrays that holds the
>recordsets' definitions (name, type, definedsize). I would prefer to
>do this with 'objects' but I am guessing I can only do this if I know
>the definitions beforehand.
>
>Any thoughts are appreciated.
>
>Cheers
>
>The Frog
|
|
0
|
|
|
|
Reply
|
Tom
|
3/19/2010 1:35:38 PM
|
|
Hi Tom,
Not really. I was thinking more of working with stacks and ques. I am
not aware of any way to achive this except with classes (for complex
objects). I am thinking that it might be easier to build a simple
object heirarchy, effectively simulating the recordset object - but
without all the database specific functions. Just a data holder in
effect. Its for a set of rather complex analyses where the recordset
itself isnt suitable. I need to be able to manipulate each object
individually and feed them into different parts of the analysis
independantly.
Cheers
The Frog
|
|
0
|
|
|
|
Reply
|
The
|
3/22/2010 8:24:52 AM
|
|
On Mon, 22 Mar 2010 01:24:52 -0700 (PDT), The Frog
<mr.frog.to.you@googlemail.com> wrote:
OK, I re-read your OP and did get a different impression. Sure you can
build your own objects, and put them in collections. If you think
about the Properties collection for example it is built on-the-fly and
you can add new elements to it at any time.
-Tom.
Microsoft Access MVP
>Hi Tom,
>
>Not really. I was thinking more of working with stacks and ques. I am
>not aware of any way to achive this except with classes (for complex
>objects). I am thinking that it might be easier to build a simple
>object heirarchy, effectively simulating the recordset object - but
>without all the database specific functions. Just a data holder in
>effect. Its for a set of rather complex analyses where the recordset
>itself isnt suitable. I need to be able to manipulate each object
>individually and feed them into different parts of the analysis
>independantly.
>
>Cheers
>
>The Frog
|
|
0
|
|
|
|
Reply
|
Tom
|
3/22/2010 1:55:06 PM
|
|
Hi Tom,
Thats a great example. I didnt think of that. Its perfect. Create a
basic 'atom' of information as an object, and create a 'molecule'
object that has a collection of 'atoms'. That will do nicely :-)
Thanks for kicking this around with me Tom, I appreciate it.
Cheers
The Frog
|
|
0
|
|
|
|
Reply
|
The
|
3/23/2010 10:01:51 AM
|
|
|
4 Replies
245 Views
(page loaded in 0.109 seconds)
Similiar Articles: Idea: Applesoft & BG music - comp.sys.apple2.programmerCustom Object built on the fly? - comp.databases.ms-access ... Idea: Applesoft & BG music - comp.sys.apple2.programmer ..... something like a turn based RPG, you could ... Best way to force refresh - comp.databases.filemakerHi, I built a toy database to assist me learning FM7 to ... so the relationships are working, but not 'on the > fly ... If so, what is the best way to determine that the object ... (non)antialiasing on the same texture - comp.graphics.api.opengl ...how can i change the antialiasing settings "on the fly ... The non-alpha tested objects are being rendered into the ... Similarly, ATI introduced Custom Filter Anti-Aliasing ... Custom Property Rename - comp.cad.solidworks... go about renaming a property book that I created that now has many pages built ... How to: Customize an Entity Data Model to Work with Custom Objects ... Rename the Property ... Observable collections (set, list, map) - comp.lang.java ...The code will generate adapter classes *on the fly* that will downcast from Observable to the custom ... I know the object of interest in observer is Object arg, I ... How to find what library a symbol is defined in. - comp.unix ...... do a lot so I just scribble something up on the fly ... To, Find Symbol, or Go to Definition to search for objects ... How to Create a Custom Symbols Library for Illustrator ... Bad use of stringstream temporary? - comp.lang.c++... rvalue is to support the use of temporary ostreams in the kind of on-the-fly ... Bad use of stringstream temporary? - comp.lang.c++... stringstream object in a custom class ... Bareword errors? - comp.lang.perl.miscThis is perl, v5.8.1-RC3 built for darwin-thread-multi ... posting to the NG and defined the variables on the fly ... value of code reuse via modules, why does nobody object ... Poker hand evaluator - comp.lang.javascriptIf one doesn't mind making new Arrays on the fly (I am not sure they ... Custom Object built on the fly? - comp.databases.ms-access ... Poker hand evaluator - comp.lang ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... Animate text or objects - PowerPoint - Office.comApply a built-in or custom animation effect, such as entrance ... special visual or sound effect to text or an object. For example, you can have your text bullet points fly ... Best Custom Built Fly Rods Handmade Fly RodsHow to find the best custom built fly rods. These are handmade fly rods and are considered the best handmade fly rods on the market today. 7/7/2012 2:37:15 PM
|