-----Original Message-----
Carrie,
IMO I believe that the fastest way to transfer the data to the database
would be the use of a stored query. For instance
create an insert query "sp_InsertMyData" (I do not know offhand the limits
on the number of parameters but you have 52):
INSERT INTO myData (bit1, bit2, bit3, ... bit16, int1, int2, ... int36)
Values ([@bit1], [@bit2], ..., [@bit16],[@int1],..., [@int36])
Before reading the record loop set up the query def as such:
Dim cmd As DAO.QueryDef
Dim cnt As Integer
Set cmd = CurrentDb.QueryDefs("sp_InsertMyData")
Do
'You read you data here
' determine each bit value in a loop
Dim bitValue as Boolean
For cnt = 1 To 16
' Determine the bit values using an algorithm "GetBitValue"
from the info in my last post
If cnt <= 8 Then
bitValue = GetBitValue (myRecord.bits1_8, cnt)
Else
bitValue = GetBitValue (myRecord.bits9_16, cnt)
End If
cmd.Parameters("@bit" & cnt).Value = bitValue
Loop
' Set all of the integer parameters
cmd.Parameters("@int1").Value = myRecord.int1
...
cmd.Parameters("@int36").Value = myRecord.int1
cmd.Execute ' Save the data
' need an exit condition, not sure how you know when to stop
' reading from memory
Loop ' Read next record
Thank you for the details.
Going back a little - you write
' Import rec into your table here using what ever method
you are comfortable with
Does that mean a field-by-field transfer of values from my
record to the table? Or is there a more efficient way to
transfer the whole structure?
if
you change the variables
bit1_8 and from
a on
my
.