I've been Googling this topic, but I've got a few questions that I don't find answers to:
If a SP has the Commit & Rollback logic within it and the VB program that calls it raises an error during the call because of a connection timeout (eg. possible network cable/router failure) will that trigger the Rollback logic? I do have the check for @@Error after each SQL statement of the multi-stepped SP.
Will any error that might occur in a SP raise an error at the client or is explicit logic required to fully inform the client?
Aren't there errors (short of server power failure) that cause a SP to discontinue processing the next SQL statement so that the Rollback statement is never reached? If so doesn't that imply that best practice is to apply Commit & Rollback logic at the client app rather than within the server's SP?
What are the implications/side effects of a Begin Transaction without a Commit or Rollback Transaction? If there are no negative effects upon the server, then why bother coding Rollback logic in a SP, just don't Commit.
This whole area of programming appears to me to be full of subtle pitfalls or am I just being paranoid?
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
If a SP has the Commit & Rollback logic within it and the VB program that calls it raises an error during the call because of a connection timeout (eg. possible network cable/router failure) will that trigger the Rollback logic? I do have the check for @@Error after each SQL statement of the multi-stepped SP.
Will any error that might occur in a SP raise an error at the client or is explicit logic required to fully inform the client?
Aren't there errors (short of server power failure) that cause a SP to discontinue processing the next SQL statement so that the Rollback statement is never reached? If so doesn't that imply that best practice is to apply Commit & Rollback logic at the client app rather than within the server's SP?
What are the implications/side effects of a Begin Transaction without a Commit or Rollback Transaction? If there are no negative effects upon the server, then why bother coding Rollback logic in a SP, just don't Commit.
This whole area of programming appears to me to be full of subtle pitfalls or am I just being paranoid?
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]