Stored procedure runs interactively but not via application

We have a stored procedure that we recently modified to improve performance. It runs fine interactively (Rapid SQL) but will not run when executed via the application.

Up until our modification, the stored procedure did run via the application.

The change we made to the stored procedure was the use of 'hints', specifically

the use of 'with index' that enabled the execution time to improve from 10 seconds

to 1 second.

Environment:

SQL Server version 7

Visual Basic version 6

To recap:

- application ran fine , albeit slow, for past few years

- recently modified stored procedure to improve performance

- modified stored procedure will not run via application anymore

Any ideas

thanks

Bopa



Answer this question

Stored procedure runs interactively but not via application

  • Karthik R

    The solution was to re-arrange the from list until it worked.

    For example:

    old: from table1, table2, table3

    new: from table2, table3, table1

    This was not to be expected, but it did solve the problem.


  • Stored procedure runs interactively but not via application