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.
Author |
Topic |
Pete32
Starting Member
4 Posts |
Posted - 2007-03-30 : 11:13:06
|
We recently switched over from SQL7 to SQL2000 and a new error has come up. The statements below raise the "Invalid argument for SET ROWCOUNT. Must be a non-null non-negative integer." error on SQL2000 but not SQL7. declare @row integerset @row = nullset rowcount @rowI understand that this error should occur, but why doesn't it raise an error on our SQL7 server. I'm guessing this has to do with the configuration options, but I can't figure which one. Please help. |
|
X002548
Not Just a Number
15586 Posts |
|
Pete32
Starting Member
4 Posts |
Posted - 2007-03-30 : 17:20:49
|
Thanks Brett, but that's not what I'm trying to do. I'm trying to dynamically set the rowcount. |
 |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-30 : 17:35:48
|
I'm guessing it's just better/different error handling in 2000 - as you said it should be an error, 2000 is just giving the error as it should. If you don't get the error in 7.0 then it was a bug in 7.0. You wouldn't want an option in 2000 to make it behave like the bug in 7.0, even if that was more compatible. |
 |
|
X002548
Not Just a Number
15586 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
Pete32
Starting Member
4 Posts |
Posted - 2007-04-02 : 08:21:40
|
A bug in SQL7....that sounds like the most likely reason. Thanks snSQL. |
 |
|
Wang
Starting Member
48 Posts |
Posted - 2007-04-02 : 08:59:19
|
quote: Originally posted by X002548 And what does that even mean....dynamically trying to set rowcountWhy would you want to do that?
Presumably because you can't call select top n? |
 |
|
|
|
|