Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Only on the server: Updating columns with the rowguidcol property is not allowed

Posted on 2005-03-09
9
Medium Priority
?
1,263 Views
Last Modified: 2011-09-20
Hello experts,

I have a SP, shich uses something like this:

UPDATE ObjectTable
SET ObjectID = ObjectID
WHERE ...

I use the SET line just to force a check constraint on this column to be recalculated. The ObjectID column is of type uniqueidentifier, rowguid.

The SP works without any problems on my development machine (Windows XP Pro, SQL Server Personal SP 3, English) but fails with the error "Updating columns with the rowguidcol property is not allowed" on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

Is this an option or something? Why is it working on my machine and fails on the server?

TheAvenger
0
Comment
Question by:TheAvenger
  • 4
  • 3
  • 2
9 Comments
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 13494384
>>The SP works without any problems on my development machine

In this machine may be your where may not be satisfied..

 
>> but fails with the error "Updating columns with the rowguidcol property is not allowed"
on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

may be where clause is satisfied here...
0
 
LVL 13

Expert Comment

by:KarinLoos
ID: 13494402
<<I use the SET line just to force a check constraint on this column to be recalculated. The ObjectID column is of type uniqueidentifier >>
what do you mean with this ? what are you trying to force ?
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 13494405
You can't update olumns with the rowguidcol



>>The SP works without any problems on my development machine

here WHERE clause may not be satisfied..  so no updates....

 
>> but fails with the error "Updating columns with the rowguidcol property is not allowed"
on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

may be where clause is satisfied here...  

itsvtk
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 20

Author Comment

by:TheAvenger
ID: 13494408
No, the where clause is always satisfied (I have some other fields to be set in the same clause and they are successfully satisfied).

What I figured out now is that the table is replicated on the server. It is a merged replication and the ID column is actually used for the replication itself, while on my machine there is no replication. Could this be the problem? If yes, how can I force a field level check constraint, which uses a UDF, to be rechecked in a specific place, like in my SP? Because if I change only other fields the check constraint is not rechecked but it has to be
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494423
It's somewhat complicated: this SP updates the table A. There is also a table B and a connecting table C. When the details are updated in A, there may be a conflict with the connections between A and B (implemented through C). So I have a check constraint on the ID of table A that verifies if a problem appeared (the UDF reads data from the tables B and C as well other records from A to identify this).

If I can force the check constraint to fire in another way, my problem is solved
0
 
LVL 13

Accepted Solution

by:
KarinLoos earned 2000 total points
ID: 13494450
why are you not implementing the update check in a trigger on tableA ?
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494527
This is a possible solution but requires a lot of changes - stored procedures for error handling, etc. Isn't there another way?
0
 
LVL 13

Expert Comment

by:KarinLoos
ID: 13494570
not that I can think of..   the reason you cannot probably cannot update the RowGuidcol in your prod server is because of foreign key constraints to TablB or tableC which exists,  in this case you would not be allowed to update the column.
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494633
The design of the database is 1:1 the same, the data as well. The differences are as I mentioned the version of the server (Personal vs. Enterprise), the languge (English vs. German) and the replication (none vs. merged)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question