Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Trying to use sp_addextendedproperty

Author  Topic 

JacobPressures
Posting Yak Master

112 Posts

Posted - 2005-07-20 : 12:03:03
Everytime i try to use it i get:
"Server: Msg 15135, Level 16, State 1, Procedure sp_validatepropertyinputs, Line 147
Object is invalid. Extended properties are not permitted on 'dbo.onions.onionsid', or the object does not exist."

My sample code i've been playing with is as follows:

create table pubs.dbo.onions
(
onionsid int not null identity primary key,
onions varchar(30) null,
pill varchar(30) null
)
go

exec sp_addextendedproperty 'Description', 'This is a word','user','dbo','table','onions','column','onionsid'

I don't know what i'm doing wrong or why i'm getting this error.
Thanks!

JacobPressures
Posting Yak Master

112 Posts

Posted - 2005-07-20 : 12:36:34
I figured it out. The example found here at msdn.com didn't work for me.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_adda_4ld5.asp

mine above is based on that example.

I had to add USE PUBS before the SP would work. Once i did that i had no problems

Use Pubs
Go
exec sp_addextendedproperty 'Description', 'This is a word','user','dbo','table','onions','column','onionsid'

Go to Top of Page
   

- Advertisement -