You might want to check out the UDF forum for ideas as well.. there is a lot of info in there on connecting to SQL via KiXtart.

Brian