Hi,
I'm using DBUtils.ExecuteMemoryTable to read a table. This results in a list of arrays, each object being a string array. Now I've to find the indexof a particular string in this list. My code below doesn't work because I figure strings are pointers. Is there any easy way to recode to ensure intEntryFound holds 10?
Dim strStock() as String
lstAllStockList = DBUtils.ExecuteMemoryTable(sqlLocalFile,strQuery,Null,0)
strStock = lstAllStockList.Get(10)
intEntryFound = lstAllStockList.IndexOf(strStock(0))
I've many lists that are read from different tables and I've to use indexOf to identify the location of particular records. I'm hoping that we can make this logic work.
I would like to avoid using select queries on these many tables since these selects would be inside a loop and then there will be a large number of db queries. I am assuming indexOf in a list would be faster and more efficient than a select query, when the code is in a loop.
Thanks,
Sathish
I'm using DBUtils.ExecuteMemoryTable to read a table. This results in a list of arrays, each object being a string array. Now I've to find the indexof a particular string in this list. My code below doesn't work because I figure strings are pointers. Is there any easy way to recode to ensure intEntryFound holds 10?
Dim strStock() as String
lstAllStockList = DBUtils.ExecuteMemoryTable(sqlLocalFile,strQuery,Null,0)
strStock = lstAllStockList.Get(10)
intEntryFound = lstAllStockList.IndexOf(strStock(0))
I've many lists that are read from different tables and I've to use indexOf to identify the location of particular records. I'm hoping that we can make this logic work.
I would like to avoid using select queries on these many tables since these selects would be inside a loop and then there will be a large number of db queries. I am assuming indexOf in a list would be faster and more efficient than a select query, when the code is in a loop.
Thanks,
Sathish