March 30, 2020 at 12:00 am
Comments posted to this topic are about the item @@CURSOR_ROWS -m Flag
March 30, 2020 at 5:42 am
Nice question, thanks Miles
Learned something today, as i seldom use cursors...
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
March 30, 2020 at 6:22 am
This is not a correct answer. There's no -m flag. From the documentation, @@cursor_rows returns -m if the cursor is being asynchronously populated. That just means a negative value m is returned by the function. There are no flags to send to the function.
Sql Server blog: http://www.tsql.nu
March 30, 2020 at 6:41 am
Hi Miles. Given the timing of this question, it is possible that it's an April Fools joke. But, just in case it is serious, as well as for those that take it seriously even if it is meant as a joke, it should be clarified that (some of it already stated by @Magnus):
"Keyset-driver or static cursors open asynchronously if the value for sp_configure cursor threshold exceeds 0, and the number of rows in the cursor result set exceeds the cursor threshold."
Take care,
Solomon...
SQL# — https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
Sql Quantum Lift — https://SqlQuantumLift.com/ ( company )
Sql Quantum Leap — https://SqlQuantumLeap.com/ ( blog )
Info sites — Collations • Module Signing • SQLCLR
March 30, 2020 at 6:59 am
I agree with magnus that -m is not a flag for the @@CURSOR_ROW function, i only indicates in BOL that a negative value returned by the function indicates that the cursor populates asynchronously and has M rows currently in the keyset.
Louis
March 30, 2020 at 7:05 am
This is not a correct answer. There's no -m flag. From the documentation, @@cursor_rows returns -m if the cursor is being asynchronously populated. That just means a negative value m is returned by the function. There are no flags to send to the function.
+1
March 31, 2020 at 11:21 am
Well, I managed to guess how the author arrived at what was designated as the correct answer. But clearly, that is a gross misunderstanding of the cited article from BOL.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply