Showing posts with label updating. Show all posts
Showing posts with label updating. Show all posts

Monday, March 26, 2012

Invalid object name 'tsvw_

Hi Everyone!

Is someone here can help me on this?

I receive a error when inserting or Updating row in a replicated table

the error is Invalid object name 'tsvw_*****

What to do with this

More detail please... What version of SQL server are you using? What type of replication are you using? and etc...|||

Sorry, here some more

I'm using MSDE version of SQL 2000, and 3 layer merge replication, on a WAN

|||when you say three layers, do you mean you have a republishing scenario? "tsvw_*" is a view used by merge replication, my guess is that it may have been dropped somewhere during your setup. If you're doing a republishing scenario, make sure you set up A to B first, then republish B to C.

Friday, March 9, 2012

invalid column error when updating a new column that was added by alter table

i am getting an error "Invalid Column name <column name>" message when runni
ng an update statement which updates a new column which was just added by an
alter table statement. If i run the alter statement and update statement se
perately, i don't get any e
rrors and it works. I only get this when they run together in a script or st
ored proc.
Is this a bug and what are the alternatives. Thanks.This is the way that the parser work. As the column doesn't (yet) exists at
parse time, the update will
generate the error. One way around it is to do the update with dynamic SQL.
OTOH, I'd re-consider why you have
to add a column dynamically in the first place (if possible).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"jsin" <anonymous@.discussions.microsoft.com> wrote in message
news:6A977D73-49D1-4229-92B1-B90B8E054540@.microsoft.com...
> i am getting an error "Invalid Column name <column name>" message when running an
update statement which
updates a new column which was just added by an alter table statement. If i
run the alter statement and update
statement seperately, i don't get any errors and it works. I only get this w
hen they run together in a script
or stored proc.
> Is this a bug and what are the alternatives. Thanks.

invalid column error when updating a new column that was added by alter table

i am getting an error "Invalid Column name <column name>" message when running an update statement which updates a new column which was just added by an alter table statement. If i run the alter statement and update statement seperately, i don't get any e
rrors and it works. I only get this when they run together in a script or stored proc.
Is this a bug and what are the alternatives. Thanks.
This is the way that the parser work. As the column doesn't (yet) exists at parse time, the update will
generate the error. One way around it is to do the update with dynamic SQL. OTOH, I'd re-consider why you have
to add a column dynamically in the first place (if possible).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"jsin" <anonymous@.discussions.microsoft.com> wrote in message
news:6A977D73-49D1-4229-92B1-B90B8E054540@.microsoft.com...
> i am getting an error "Invalid Column name <column name>" message when running an update statement which
updates a new column which was just added by an alter table statement. If i run the alter statement and update
statement seperately, i don't get any errors and it works. I only get this when they run together in a script
or stored proc.
> Is this a bug and what are the alternatives. Thanks.