oledb32: Source status DBSTATUS_S_ISNULL applies to all conversions.

This commit is contained in:
Alistair Leslie-Hughes 2013-05-21 13:43:42 +10:00 committed by Alexandre Julliard
parent 24e56beec0
commit 7dfa56886f
2 changed files with 15 additions and 7 deletions

View File

@ -184,6 +184,13 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
return DB_E_UNSUPPORTEDCONVERSION;
}
if(src_status == DBSTATUS_S_ISNULL)
{
*dst_status = DBSTATUS_S_ISNULL;
*dst_len = 0;
return S_OK;
}
if(src_type == DBTYPE_STR)
{
BSTR b;
@ -805,13 +812,6 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
{
VARIANT *v = dst;
if(src_status == DBSTATUS_S_ISNULL)
{
*dst_status = DBSTATUS_S_ISNULL;
*dst_len = 0;
return S_OK;
}
switch(src_type)
{
case DBTYPE_BOOL:

View File

@ -884,6 +884,14 @@ todo_wine
ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status);
ok(dst_len == sizeof(i4), "got %ld\n", dst_len);
ok(i4 == 10, "got %08x\n", i4);
/* src_status = DBSTATUS_S_ISNULL */
i4 = 0x12345678;
hr = IDataConvert_DataConvert(convert, DBTYPE_I4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), DBSTATUS_S_ISNULL, &dst_status, 0, 0, 0);
ok(hr == S_OK, "got %08x\n", hr);
ok(dst_status == DBSTATUS_S_ISNULL, "got %08x\n", dst_status);
ok(dst_len == 0, "got %ld\n", dst_len);
}
static void test_converttoi8(void)