question

Binoy avatar image
Binoy asked

Error 21001: [SQL-DMO]Stored procedure

I am Getting an error as below, when I make any changes and give Ok button in an Existing Stored procedure (Sql Server 2000)

Error 21001: [SQL-DMO]Stored procedure definition must include name and text (for Standard StoredProcedure) or libraryname (for Extended StoredProcedure).

How to rectify this problem please advise me....

sql-server-2000stored-procedures
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image Kev Riley ♦♦ commented ·
can you post the source of the stored procedure?
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
Or post the code you're using to call the proc from DMO. It sounds like the DMO syntax is off.
0 Likes 0 ·
Binoy avatar image Binoy commented ·
entire code is too long so i am posting the definition statement CREATE PROCEDURE[dbo].[PROC_PayrollProcessing](@compid as varchar(20),@currentmonth as varchar(20)) as begin ................ end The same name is available in the object view in Management Studio also
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
are you logged into SQL with an account that has the right permissions?
0 Likes 0 ·

1 Answer

·
Kev Riley avatar image
Kev Riley answered

Are you editing an existing SP?

Does the code work fine if you create the SP using Query Analyzer rather than the GUI in Management Studio?


What is the result of running

select * from sysobjects where name like '%PayrollProcessing%'

making sure you are in the database where that procedure exists

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Binoy avatar image Binoy commented ·
Yes It is working while creating it through Query Anlyser
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
in that case, it seems to be in the way you are trying to edit it in Management Studio. What chnages are you trying to save? Are you chnaging the name or schema of the proc?
0 Likes 0 ·
Binoy avatar image Binoy commented ·
Without any modification, if i try to click OK or Apply It gives me the same error..
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
does the name in the stored proc definition (ie.e in code) match the one in the object view in Management Studio?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.