ADO Seek method
-
Hi, I am trying to use the Seek method in an ADO recordset object. It works fine if the index is only one field. For an index with multple fields, say two strings, I cannot seem to make it work properly. MSDN says that the first argument is a Variant array. example code: _variant_t varKeys[2]; varKeys[0] = "value1"; varKeys[1] = "value2"; m_pRecordset->Seek( varKeys, adSeekFirstEQ ); What happens is that only the first value seems to taken into account. Any ideas ? note: I am using an MDB (Access) database. Opening using Jet4 conenct string. thanks, Louis.
-
Hi, I am trying to use the Seek method in an ADO recordset object. It works fine if the index is only one field. For an index with multple fields, say two strings, I cannot seem to make it work properly. MSDN says that the first argument is a Variant array. example code: _variant_t varKeys[2]; varKeys[0] = "value1"; varKeys[1] = "value2"; m_pRecordset->Seek( varKeys, adSeekFirstEQ ); What happens is that only the first value seems to taken into account. Any ideas ? note: I am using an MDB (Access) database. Opening using Jet4 conenct string. thanks, Louis.
ldaoust wrote: MSDN says that the first argument is a Variant array. It seems like rather than an array of variants, what you need is a single variant containing an array of values. Check this article[^]. -- jlr http://jlamas.blogspot.com/[^]
-
ldaoust wrote: MSDN says that the first argument is a Variant array. It seems like rather than an array of variants, what you need is a single variant containing an array of values. Check this article[^]. -- jlr http://jlamas.blogspot.com/[^]