I'm looking for opinions/facts on these topics.
I've been querying an Access DB and creating arrays in a RecordSet based on ", " delimiters in my jet sql statements. Here's an example:
Code:
sql = "SELECT [UserID] & ', ' & [Job#] & ', ' & [Priority] & ', ' & [EndTime] AS [strJobDetails] FROM [Job] WHERE [Account#]=1 AND [Dept#]=0 ORDER BY [UserID], [Job#];"
When creating an array of fields like this, is any one character a "better" candidate as a delimiter in terms of processing efficiency and/or consistent results? For example a ";" instead of a ",".
Also, when defining the delimiter in the sql statement, the example that I took this concept from adds a space after the delimiter, is this the best practice?
Still with me? Great!
Once the recordset has been defined, I've been looping through the results (obviously including EOF and BOF conditions).
At the beginning of each loop I split the array like this:
Code:
strJobArray = Split(rs("strJobDetails"), ", ")
For example:
Code:
strJobArray(0) = strUID
I know there's a fine line between "Best Coding Practice" and crazy, anal retentive coder, but since this app will be used 24/7 I want to start out with the best blend of coding pratices and efficienty/consistency.
Think you have a better way to accomlish these tasks? Let me know. All comments/opinions/thrashings welcomed and appreciated (not too many thrashings!).
Thanks.