Hi Ingo,
I did some tracing and from what I can see Uniface will set the cursor type according to the keysetcursor setting.
This is what I can see in the ODBC tracing:
ide 3c10-5f8c EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x071B72D8
SQLINTEGER 6 <sql_attr_cursor_type>
SQLPOINTER 0 <sql_cursor_forward_only>
SQLINTEGER -5 ]] ></sql_cursor_forward_only></sql_attr_cursor_type>
This is what the driver is actually setting.
In the SQL Profiler I can see that the following is generated for SP_CURSORPREPEXEC (event RPC:starting):
declare @p1 int
set @p1=NULL
declare @p2 int
set @p2=0
declare @p5 int
set @p5=20484
declare @p6 int
set @p6=8193
declare @p7 int
set @p7=0
exec sp_cursorprepexec @p1 output,@p2 output,N'@P1 char(7)',N'select [ulabel],[ubase],[uform],[ukversion],[umversion],[udescr],[u_bord],[db_access],[u_upd],[u_minr],[u_maxr],[u_int],[templatename],[uinherit],[ualt_name],[uwaorder],[ucomment] from [uxgroup] where ([uform]=@P1) order by [uform] asc, [ubase] asc, [ulabel] asc ',@p5 output,@p6 output,@p7 output,'HKR_ZZZ'
select @p1, @p2, @p5, @p6, @p7
If I understand it correctly then the FORWARD_ONLY cursor type is set (along with KEYSET_ACCEPTABLE and FORWARD_ONLY_ACCEPTABLE), as expected.
I saw that the value for the cursor type can be different once the function is executed. No idea why that's the case.
Daniel