Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. NUnit sql exception

NUnit sql exception

Scheduled Pinned Locked Moved ASP.NET
sharepointdatabasehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 4510968
    wrote on last edited by
    #1

    hi friends, I have a sp for delete like this ALTER procedure [dbo].[pr_DeleteCampus] ( @campuscode smallint ) as delete from campus where campuscode = @campuscode but when i pass the parameter in the method and do NUit test like this public void deletecampus(int campuscode) { campuscode = 7; Assert.That(7, Is.Not.EqualTo(campuscode)); } It throws an error Sql Error Exception:Exception Procedure or Function sp_name expects parameter '@campuscode',which was not supplied.

    C 1 Reply Last reply
    0
    • U User 4510968

      hi friends, I have a sp for delete like this ALTER procedure [dbo].[pr_DeleteCampus] ( @campuscode smallint ) as delete from campus where campuscode = @campuscode but when i pass the parameter in the method and do NUit test like this public void deletecampus(int campuscode) { campuscode = 7; Assert.That(7, Is.Not.EqualTo(campuscode)); } It throws an error Sql Error Exception:Exception Procedure or Function sp_name expects parameter '@campuscode',which was not supplied.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      This code doesn't call the proc, so a piece is missing.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      U 1 Reply Last reply
      0
      • C Christian Graus

        This code doesn't call the proc, so a piece is missing.

        Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

        U Offline
        U Offline
        User 4510968
        wrote on last edited by
        #3

        I have a dll which calls the procedure. The same method works for select stored procedure option.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups