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
 General SQL Server Forums
 New to SQL Server Programming
 Trouble modifying a table

Author  Topic 

weeder
Starting Member

3 Posts

Posted - 2007-03-13 : 08:52:14
Hi There,

I am trying to add a new field to a table using enterprise manager by right clicking on the table, choosing design table and adding the new field/column. But when I choose save changes, I receive an error message:

------------------------------------------------------------
Errors were encountered during the save process. Some of the database objects were not saved.
'Comments' Table
-Unable to modify table
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL SERVER] ...
... Cannot drop the table 'dbo.Comments' because it is being used for replication
-----------------------------------------------------------

If it helps I am trying to add a binary (bit) field and a text field of 50 characters. I think the replication it refers to is a merge replication (not sure though is there a way i can find out in EM?)

I have read some articles which refer to this problem and suggest using stored procedures but I really dont know how to do that, having never used them before. I need an idiots guide please!

Let me know if I need to provide more info. Thanks.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-03-13 : 08:59:41
Try adding column using ALTER TABLE statement.

Alter Table Tablename
Add columnname datatype NULL|NOT NULL


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

weeder
Starting Member

3 Posts

Posted - 2007-03-13 : 10:06:05
I have tried that with a similar error message.
Go to Top of Page

weeder
Starting Member

3 Posts

Posted - 2007-03-13 : 10:21:27
[url]http://www.sqlservercentral.com/columnists/pibison/alteringacolumnonareplicatedtable.asp[/url]

I think option b on this page may be what I am looking for but how do I go about using this method - unfortunately this artcle assumes the reader has basic sql server knowledge!
Go to Top of Page
   

- Advertisement -