I am trying to use seek on a Btrieve table with a two column index. The code I am using follows:
(PPMDSN is a string containing the DSN name, Patient is the table name. key0 is the name of the Btrieve index and it has two columns.)
After execution, the recordset is at EOF indicating that the matching record was not found. Using the same code with the execption of Dimming the array with one element, works fine on an index with one column, just not with two.
Open to any and all suggestions! Thanks.
(PPMDSN is a string containing the DSN name, Patient is the table name. key0 is the name of the Btrieve index and it has two columns.)
Code:
Set cnnPPM = New ADODB.Connection
strcnnPPM = "Provider=PervasiveOLEDB;Data Source=" + PPMDSN
cnnPPM.Open strcnnPPM
Set rsC = New ADODB.Recordset
rsC.Open "Patient", cnnPPM, adOpenDynamic, adLockBatchOptimistic, adCmdTableDirect
Dim VariantArray(1) As Variant
VariantArray(0) = "971364825"
VariantArray(1) = "992AAAAA"
rsC.Index = "key0"
rsC.Seek Variantarray, adSeekAfterEQ
Open to any and all suggestions! Thanks.