Hi ,
Can someone tell me why I am getting the following error while I am trying to add users in a database.:
:System.Data.SqlClient.SqlException Could not find stored procedure "addUser"
where should we normally keep our stored procedures? ( i am new to sql server)
thank you in advance
I presume that addUser is an sp that you have written? If so which database was it create in and which database is your current one?
As an example for many connections master is the default database so it may be created there and you are trying to run in the application database? Or you could be in master now and the SP could be in your database. You can fix this by always doing a "use database" before you run any commands
|||From the point that addUser is not a procedure written by you, I have to tell you that there is actually no adduser procedure in SQL Server by default. Users are created by using the CREATE USER commands and no SP. If you mean the (tobe) deprecated procedurte sp_adduser, you sure have to call it with the right name that you can access it the whole name is that with the sp_ writte in front of your mentioned procedure.HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment