mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 08:08:20 +00:00
msado15: Update editMode in AddNew/Cancel/Update functions.
This commit is contained in:
parent
5bfd2fc19c
commit
8fa02bf086
|
@ -1588,12 +1588,20 @@ static HRESULT WINAPI recordset_AddNew( _Recordset *iface, VARIANT field_list, V
|
|||
|
||||
if (!resize_recordset( recordset, recordset->count + 1 )) return E_OUTOFMEMORY;
|
||||
recordset->index++;
|
||||
recordset->editmode = adEditAdd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_CancelUpdate( _Recordset *iface )
|
||||
{
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
|
||||
FIXME( "%p\n", iface );
|
||||
|
||||
if (V_DISPATCH(&recordset->active_connection) == NULL)
|
||||
return S_OK;
|
||||
|
||||
recordset->editmode = adEditNone;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -2153,7 +2161,14 @@ static HRESULT WINAPI recordset__xResync( _Recordset *iface, AffectEnum affect_r
|
|||
|
||||
static HRESULT WINAPI recordset_Update( _Recordset *iface, VARIANT fields, VARIANT values )
|
||||
{
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
|
||||
FIXME( "%p, %s, %s\n", iface, debugstr_variant(&fields), debugstr_variant(&values) );
|
||||
|
||||
if (V_DISPATCH(&recordset->active_connection) == NULL)
|
||||
return S_OK;
|
||||
|
||||
recordset->editmode = adEditNone;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -2270,13 +2285,27 @@ static HRESULT WINAPI recordset__xClone( _Recordset *iface, _Recordset **obj )
|
|||
|
||||
static HRESULT WINAPI recordset_UpdateBatch( _Recordset *iface, AffectEnum affect_records )
|
||||
{
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
|
||||
FIXME( "%p, %u\n", iface, affect_records );
|
||||
|
||||
if (V_DISPATCH(&recordset->active_connection) == NULL)
|
||||
return S_OK;
|
||||
|
||||
recordset->editmode = adEditNone;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recordset_CancelBatch( _Recordset *iface, AffectEnum affect_records )
|
||||
{
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
|
||||
FIXME( "%p, %u\n", iface, affect_records );
|
||||
|
||||
if (V_DISPATCH(&recordset->active_connection) == NULL)
|
||||
return S_OK;
|
||||
|
||||
recordset->editmode = adEditNone;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -2350,7 +2379,14 @@ static HRESULT WINAPI recordset_Find( _Recordset *iface, BSTR criteria, LONG ski
|
|||
|
||||
static HRESULT WINAPI recordset_Cancel( _Recordset *iface )
|
||||
{
|
||||
struct recordset *recordset = impl_from_Recordset( iface );
|
||||
|
||||
FIXME( "%p\n", iface );
|
||||
|
||||
if (V_DISPATCH(&recordset->active_connection) == NULL)
|
||||
return S_OK;
|
||||
|
||||
recordset->editmode = adEditNone;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ if (0)
|
|||
editmode = -1;
|
||||
hr = _Recordset_get_EditMode( recordset, &editmode );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
todo_wine ok( editmode == adEditAdd, "got %d\n", editmode );
|
||||
ok( editmode == adEditAdd, "got %d\n", editmode );
|
||||
|
||||
rec_count = -1;
|
||||
hr = _Recordset_get_RecordCount( recordset, &rec_count );
|
||||
|
@ -317,6 +317,23 @@ if (0)
|
|||
ok( V_VT( &val ) == VT_I4, "got %u\n", V_VT( &val ) );
|
||||
ok( V_I4( &val ) == -1, "got %ld\n", V_I4( &val ) );
|
||||
|
||||
/* Update/Cancel doesn't update EditMode when no active connection. */
|
||||
hr = _Recordset_Update( recordset, missing, missing );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
editmode = -1;
|
||||
hr = _Recordset_get_EditMode( recordset, &editmode );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( editmode == adEditAdd, "got %d\n", editmode );
|
||||
|
||||
hr = _Recordset_Cancel( recordset );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
editmode = -1;
|
||||
hr = _Recordset_get_EditMode( recordset, &editmode );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( editmode == adEditAdd, "got %d\n", editmode );
|
||||
|
||||
hr = _Recordset_AddNew( recordset, missing, missing );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
|
|
Loading…
Reference in a new issue