NUnit sql exception
-
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.
-
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.
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.
-
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.
I have a dll which calls the procedure. The same method works for select stored procedure option.