Today’s Handy Function: ListQualify();

Today I ran across the first instance in which I needed to pass a comma delimited list to a Data Access Object to use as query criteria. As these items were in a list, the DAO needed to convert the list to a quoted value list before passing it off to the query object. Usually in this case I would use QuotedValueList, which I use quite often, but since I was passing a string to the DAO and not a query object, this function would not work in this case. However, ListQualify() did the trick.

Essentially all that I had to do to convert the non-quoted list to a quoted list was:

ListQualify(ListName,"'",",","all");

Good stuff. It’s interesting that I actually haven’t needed/came across this function before even though I work with lists pretty frequently.

This entry was posted in Languages, Tips, Hacks, & Tricks and tagged , , , , , , , , . Bookmark the permalink.

2 Responses to "Today’s Handy Function: ListQualify();"

Leave a reply