Hi Gang
I have a large VB program that at one point does a lookup to a small
table (26 rows by 3 columns). With this table I have to do some
counting and retrieval of data. I'm finding that this slows the
program right down.
Is there any way I can take a copy of the table in memory and access it
there. Perhaps a cursor or something? Can someone help with a code
sample. Here's my code to do the lookup.
'-------------------------------------------------------------------------------------
lcFoundCADIMUOM = "False"
lcPrintUOMNotFo und = ""
Set rsUOMCheck = db.OpenRecordse t("SELECT cadimuom FROM CADIM_UOM WHERE
cadimuom = '" & lcUOM & "'")
If rsUOMCheck.Reco rdCount <> 0 Then
lcFoundCADIMUOM = "True"
End If
If lcFoundCADIMUOM = "False" Then
Set rsUOMCheck = db.OpenRecordse t("SELECT cadimuom FROM CADIM_UOM
WHERE cadimuomconvert = '" & lcUOM & "'")
If rsUOMCheck.Reco rdCount <> 0 Then
lcFoundCADIMUOM = "True"
lcUOM = rsUOMCheck("cad imuom")
End If
End If
If lcFoundCADIMUOM = "False" Then
lcPrintUOMNotFo und = lcPrintUOMNotFo und & lcUOM & Chr(10)
End If
'-------------------------------------------------------------------------------------
Thanks
Andy