Look I define an updatable cursor right? Query Analyzer always said: In the READ ONLY cursor can not specify FOR UPDATE.

Category: MS-SQL Server -> Foundation Classes Author: li10892771 Date: 2005-03-01 14:58:37
 
li10892771
2005-03-01 14:58:37
declare crname SCROLL cursor for select sex, lno from peoplename order by lno for update
Why wrong?
zhaishanshan19881026
2005-03-01 15:03:56
declare cursor name cursor for select sex, lno from peoplename order by lno for update of column names to be updated
chenbo625
2005-03-01 15:22:45
I did not write good too.

test on my computer the following statements is correct with you than just field names and table names is different
declare crname SCROLL cursor for select area code, area name from the geographical information order by area code for update
pengzhibing
2005-03-01 15:26:36
is not your peoplename not support updating?
xdlok
2005-03-01 15:39:33
What do you do user login? Login User privilege is not enough.
gzc1230978
2005-03-01 15:52:32
into this a try:

declare crname cursor SCROLL for

select sex, lno from peoplename - order by lno

for update
feiermi_6
2005-03-01 16:12:02
You say that as if it will not work? Or wrong?
xiazaizyyx
2005-03-01 16:27:07
closer look at your database table structure has not set a primary key, whether it can be updated?

aaa38
2005-03-01 16:37:17
declare crname SCROLL cursor for select sex, lno from peoplename order by lno for update
itself did not wrong
just do not support updates, to update, they need to be updated followed by the field name of
eg:
declare crname SCROLL cursor for select sex, lno from peoplename order by lno for update of sex