We're attempting to return a table/result set from a SQL Server function or stored procedure into a Delphi application. We're currently attempting this from a table valued function which works up until the point where we need to update another tables' data using an UPDATE SQL statement. The error message is 'Invalid use of side effecting operator 'UPDATE' within a function' which is a limitation of SQL Server functions. If we use a stored procedure instead how could we return a table/result set back to the calling Delphi application. We've considered using a temp table as in passing the temp table name as a parameter from the Delphi application to the SQL stored procedure thereby making the temp table result set accessible from the Delphi application. Does this seem feasible? Are there any alternate methods we can employ?