Problem executing stored procedure form code RRS feed

  • Question

  • Hi

    I am trying to execute a stored procedure which runs an update query using the code as below;

        Dim cmd As SqlCommand = New SqlCommand()
        With cmd
          .Connection = DBConn
          .CommandText = "UpdateApplicants"
          .CommandType = CommandType.StoredProcedure
        End With

    Problem is the stored procedure does not seem to be running as the desired updates do not take place. Running stored procedures manually from within SQL Server Management Studio works.

    How can I successfully execute stored procedure from within vb.net code?




    Thursday, April 21, 2011 12:03 AM


All replies