In the msdn SQL server document(http://msdn2.microsoft.com/en-us/library/aa172573(SQL.80).aspx), it states:
Transact-SQL cursors can specify the FAST_FORWARD clause on DECLARE CURSOR. This opens an optimized forward-only, read-only cursor.
But in the following section 'Implicit Conversion of Fast Forward-only Cursors', it states:
If a fast forward-only cursor is not read-only, it is converted to a dynamic cursor.
Now I am confused: is it possible to make a fast forward-only cursor 'not read-only'(updatable)?
A fast forward-only cursor by definition is read-only. Am I wrong?
Thanks,
Baihao Yuan
The newer article mentions that In SQL Server 2005, fast forward-only cursors are never converted.The article on ODBC says If a result set contains a text, ntext, or image column, a fast forward-only cursor is implicitly converted to a dynamic cursor and SQL_SUCCESS_WITH_INFO is returned to the application. SQLGetData is enabled for the dynamic cursor.
I think the wording of the article you mentioned is confusing, if I'm not mistaken the idea is that you might get a different cursor type than the one you asked for under certain conditions. So strictly speaking you cannot make a fast forward-only cursor updatable, but you might be in a situation when you asked for a read-only cursor, but instead received an updatable cursor.
sql
No comments:
Post a Comment