[AccessD] Write Array to Table

Drew Wutka DWUTKA at Marlow.com
Thu Feb 28 17:00:50 CST 2008


Slow way, loop through the array, and build a table.

Maybe faster way, use CopyMemory to dump each item into a string, then
write it to a text file.

Better way, instead of using a type and array, set this up as a class,
and store each 'record' as an instance of the class within a collection.
I built a 'Properties' Add-in for VB that lets you create a Properties
Property in a class (so you could do a 'for i=1 to
THRecord.Properties.Count' type loop.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
at Beach Access Software
Sent: Thursday, February 28, 2008 4:42 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Write Array to Table

Dear List:
 
Is there a quick way to write the contents of an array out to a table.
I
need to see the contents of this array and debug is too awkward.  A
table
view would be ideal.
 
The array is DIMmed as:
 
Dim mudTH() As THRecord
 
where THRecord is 
 
Private Type THRecord
    TaskID As Long                  'T
    StartDate As Date               'S
    DueDate As Date                 'D
    QuasiDueDate As Date            'Q
    TargetDate As Date              'R
    RequiredHours As Double         'H
    EarliestCompleteDate As Date    'C
    ASAP As Double                  'A
    fOrdering As Boolean            'F
    ErrorHours As Double            'E
    TempReg As Double               'Z
    DueDateFlag As Boolean          'FD
    PastDueFlag As Boolean          'FP
    ASAPFlag As Boolean             'FA
    TargetDateFlag As Boolean       'FT
End Type
 
So if necessary, I could make a table with the required number of
fields.
 
MTIA
 
Rocky
 

 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list