Do you mean a SQL Server stored procedure? I often
just use:
SELECT @strResult
at the end of the sproc, and just treat the resultset like a normal SQL query.
The other option is via output parameters..do a search at ni.com for "stored procedure" for tips
Jeff