Running Stored Procedures Via SQL-DMO

  • I am trying to write a simple app to allow MSDE users to do basic administration.

    How do I let a user run a Stored Procedure and show the results.

    I have used QueryResults to do this for Sql Select and Delete Queries which work fine.

    However with update queries they seem to run but I get an Invalid Procedure Call Error.

    I guess this is to do with quotes or syntax - suggestions appreciated.

    Eg.

    Set qryResult = oFormsDB.ExecuteWithResults(MystrTSQL)

    With Sp's I obviously need to be able to enter parameters.

    Thanks

    Andy

  • Try just using executeimmediate. Once you start doing more than the simplest of queries you'll be better off using ADO for that part of it. Richer tools, returns a real recordset...queryresults aint great.

    Andy

Viewing 2 posts - 1 through 1 (of 1 total)

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