May 23, 2012 at 12:54 pm
In all the replication stored procedures, we find following three commands:
if @@rowcount = 0
if @@microsoftversion>0x07320000
exec sp_MSreplraiserror 20598
These commands ensure that if there is no matching record then error 20598 must be raised.
My question is why " if @@microsoftversion>0x07320000 " is verified?
Could someone plz answer?
Regards,
Lucky
May 23, 2012 at 2:32 pm
why anyone would validate against the version is beyond me however, one can only assume that your stored procedure can only be run against versions > 7 im assuming version 7 is less than sql2000 perhaps someone can correct me if im wrong.
***The first step is always the hardest *******
May 23, 2012 at 3:22 pm
This is not my sp. These are the replication system sps. I don't understand why the version is validated everytime...
May 23, 2012 at 5:09 pm
luckysql.kinda (5/23/2012)
In all the replication stored procedures, we find following three commands:if @@rowcount = 0
if @@microsoftversion>0x07320000
exec sp_MSreplraiserror 20598
These commands ensure that if there is no matching record then error 20598 must be raised.
My question is why " if @@microsoftversion>0x07320000 " is verified?
The system procedure sp_MSreplraiserror requires at least that version, that's all. The test is only performed if @@rowcount returns zero (it would be clearer if Microsoft has used BEGIN...END blocks). Internal implementation details, don't worry about it.
May 23, 2012 at 6:49 pm
Got the answer from some expert. This just confirms that the sql version > 7.0.
May 23, 2012 at 6:57 pm
luckysql.kinda (5/23/2012)
Got the answer from some expert. This just confirms that the sql version > 7.0.
Well that was obvious, wasn't it?
http://www.simple-talk.com/community/forums/thread/1471.aspx
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply