Running a SP from ASP.net

  • Hi,

    I have created a SP to restore a database. it works fine when i ran through the QA. but it gives an error when i ran through the asp.ne t

    what will be the possible cause




    My Blog: http://dineshasanka.spaces.live.com/

  • most likely you are not using the same user in asp net than in QA. And that user most likely doesn't have the necessary permission to do the restore.

  • another problem could occur if you use the PRINT command in your sp. this sp will run fine in QA but will cause a web page to fail.

    Life: it twists and turns like a twisty turny thing

  • what's the specific error?

  • Another reason maybe you do not have SET NOCOUNT ON in the your SP. This will return one more record set to your client.  It's not a problem for QA.

    Peter

  • You could be experiencing a difference in SET options from the connection type used by Query Analyzer and that of ASP.NET (ODBC?). In some cases it may be necessary to enable certain SET options (in my case, Set ArithAbort On) in the Server's Connect options tab. i.e., in Enterprise Manager bring up the properties dialog on the server in question. Select the Connections tab and experiment with the various Default Connection Options.



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply