views:

53

answers:

2

In a large project relying on SQL Server stored procedures and classic ADO.NET (DataSets, DataAdapters) after INSERT, DELETE and UPDATE procedures there is a SELECT following. In code, all the methods return void, is this SELECT of any relevance - what effect does in have? What is the performance impact of the SELECT?

A: 

If your method doesn't return anything those selects are useless, unless some other application uses them for unknown reasons.

Pedro
A: 

It would help the database developer/support when running the stored procedure manually or in debug. I will often use this type of thing (in conjunction with a rollback at the end of a transaction) to validate the output before committing. Easier to have it there for next time you're reviewing it, rather than having to reinvent it. You could comment it out, but it's not hurting anything.

After all, something else could be using that stored procedure and not returning void.

Unsliced