Once you have your SQL query returning the two columns you want, there is a really easy way to create a string out of the whole set of data with a single call to the recordset:
<recordset>.GetString(, , "=", "|", "")
The arguments are:
StringFormat (you can leave that empty)
NumRows (again, leave empty or -1 for all rows)
ColumnDelimiter
RowDelimeter
NullExpr (value to use for Null values, usually "")
The recordset handles all the looping of its data and will give you a completed string with all the data in the format you want.
Peter
------------------------------------------------------
Work smarter, not harder.
|