To get to the SQL DB, you can use ODBCSQL().. I think there are some other SQL-Related UDFs for creating recordsets, etc.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's