Commit 7287bd50 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msado15: Implement _Recordset get/put CursorType.

parent 6488613a
......@@ -44,6 +44,7 @@ struct recordset
LONG index;
VARIANT *data;
CursorLocationEnum cursor_location;
CursorTypeEnum cursor_type;
};
struct fields
......@@ -910,14 +911,22 @@ static HRESULT WINAPI recordset_put_CacheSize( _Recordset *iface, LONG size )
static HRESULT WINAPI recordset_get_CursorType( _Recordset *iface, CursorTypeEnum *cursor_type )
{
FIXME( "%p, %p\n", iface, cursor_type );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %p\n", iface, cursor_type );
*cursor_type = recordset->cursor_type;
return S_OK;
}
static HRESULT WINAPI recordset_put_CursorType( _Recordset *iface, CursorTypeEnum cursor_type )
{
FIXME( "%p, %d\n", iface, cursor_type );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %d\n", iface, cursor_type );
recordset->cursor_type = cursor_type;
return S_OK;
}
static HRESULT WINAPI recordset_get_EOF( _Recordset *iface, VARIANT_BOOL *eof )
......@@ -1546,6 +1555,7 @@ HRESULT Recordset_create( void **obj )
recordset->refs = 1;
recordset->index = -1;
recordset->cursor_location = adUseServer;
recordset->cursor_type = adOpenForwardOnly;
*obj = &recordset->Recordset_iface;
TRACE( "returning iface %p\n", *obj );
......
......@@ -68,6 +68,7 @@ static void test_Recordset(void)
LONG refs, count, state;
VARIANT missing, val, index;
CursorLocationEnum location;
CursorTypeEnum cursor;
BSTR name;
HRESULT hr;
......@@ -144,6 +145,11 @@ static void test_Recordset(void)
ok( hr == S_OK, "got %08x\n", hr );
ok( location == adUseServer, "got %d\n", location );
cursor = adOpenUnspecified;
hr = _Recordset_get_CursorType( recordset, &cursor );
ok( hr == S_OK, "got %08x\n", hr );
ok( cursor == adOpenForwardOnly, "got %d\n", cursor );
VariantInit( &missing );
hr = _Recordset_AddNew( recordset, missing, missing );
ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08x\n", hr );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment