using recordset in MS Access to place values into array
-
I have a string array. I want to run a query that will pull numerous paragraphs from a database. the query works fine. I usually use string = rs.GetString, and then split the string on Chr(13) into a string array so I can loop through and place each array memeber into a combobox or listbox. however, in this situation, there is no distinct delimiter to split on. I was wondering, if I use recordset.GetRows, use that in a loop...if I could then use some property/sub routine within recordset so that I can place each result in a specific element in my array manually using a loop. Right now I have the following: 'all definitions aside' rs.Open LSQL, cnn rowCount = rs.GetRows For i = 0 To i < rowcount paragraphArray(i) = rs.????? I want to put basically the first recordset result into paragraphArray(0), second into paragraphArray(1), and so on until the recordset is at the end. I'm not sure of the exact code to use. Any ideas?
-
I have a string array. I want to run a query that will pull numerous paragraphs from a database. the query works fine. I usually use string = rs.GetString, and then split the string on Chr(13) into a string array so I can loop through and place each array memeber into a combobox or listbox. however, in this situation, there is no distinct delimiter to split on. I was wondering, if I use recordset.GetRows, use that in a loop...if I could then use some property/sub routine within recordset so that I can place each result in a specific element in my array manually using a loop. Right now I have the following: 'all definitions aside' rs.Open LSQL, cnn rowCount = rs.GetRows For i = 0 To i < rowcount paragraphArray(i) = rs.????? I want to put basically the first recordset result into paragraphArray(0), second into paragraphArray(1), and so on until the recordset is at the end. I'm not sure of the exact code to use. Any ideas?