msdasql: IDBProperties doesn't support DBPROPSET_DATASOURCEINFO property set.
Native msado15 queries this to workout if interface IMultipleResults can be used with CreateCommand. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8923be8f68
commit
f43b312562
|
@ -35,6 +35,7 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msdasql);
|
||||
|
||||
DEFINE_GUID(DBPROPSET_DATASOURCEINFO, 0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(DBPROPSET_DBINIT, 0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
|
||||
DEFINE_GUID(DBGUID_DEFAULT, 0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
|
@ -345,6 +346,26 @@ static HRESULT WINAPI dbprops_GetProperties(IDBProperties *iface, ULONG cPropert
|
|||
}
|
||||
|
||||
propset = CoTaskMemAlloc(cPropertyIDSets * sizeof(DBPROPSET));
|
||||
|
||||
if (IsEqualGUID(&rgPropertyIDSets[0].guidPropertySet, &DBPROPSET_DATASOURCEINFO))
|
||||
{
|
||||
TRACE("Propertyset DBPROPSET_DATASOURCEINFO not supported\n");
|
||||
propset->guidPropertySet = rgPropertyIDSets[0].guidPropertySet;
|
||||
propset->cProperties = rgPropertyIDSets[0].cPropertyIDs;
|
||||
|
||||
propset->rgProperties = CoTaskMemAlloc(propset->cProperties * sizeof(DBPROP));
|
||||
|
||||
for (j=0; j < propset->cProperties; j++)
|
||||
{
|
||||
propset->rgProperties[j].dwPropertyID = rgPropertyIDSets[0].rgPropertyIDs[j];
|
||||
propset->rgProperties[j].dwStatus = DBPROPSTATUS_NOTSUPPORTED;
|
||||
}
|
||||
|
||||
*prgPropertySets = propset;
|
||||
|
||||
return DB_E_ERRORSOCCURRED;
|
||||
}
|
||||
|
||||
propset->guidPropertySet = DBPROPSET_DBINIT;
|
||||
|
||||
for (i=0; i < cPropertyIDSets; i++)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "wine/test.h"
|
||||
|
||||
DEFINE_GUID(DBPROPSET_DATASOURCEINFO, 0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(DBPROPSET_DBINITALL, 0xc8b522ca, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
DEFINE_GUID(DBPROPSET_DBINIT, 0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
|
||||
|
||||
|
@ -72,9 +73,14 @@ static void test_Properties(void)
|
|||
HRESULT hr;
|
||||
IDBProperties *props;
|
||||
DBPROPIDSET propidset;
|
||||
DBPROPID propid;
|
||||
ULONG infocount;
|
||||
DBPROPINFOSET *propinfoset;
|
||||
DBPROPIDSET propidlist;
|
||||
DBPROPSET *propset;
|
||||
WCHAR *desc;
|
||||
ULONG propcnt;
|
||||
ULONG i;
|
||||
DBPROPID properties[14] =
|
||||
{
|
||||
DBPROP_AUTH_PASSWORD, DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, DBPROP_AUTH_USERID,
|
||||
|
@ -97,10 +103,6 @@ static void test_Properties(void)
|
|||
if (hr == S_OK)
|
||||
{
|
||||
VARTYPE types[14] = { VT_BSTR, VT_BOOL, VT_BSTR, VT_BSTR, intptr_vartype, VT_BSTR, VT_I4, VT_I2 , VT_I4, VT_BSTR, VT_I4, VT_BSTR, VT_I4, VT_I4 };
|
||||
ULONG i;
|
||||
DBPROPIDSET propidlist;
|
||||
ULONG propcnt;
|
||||
DBPROPSET *propset;
|
||||
|
||||
ok(IsEqualGUID(&propinfoset->guidPropertySet, &DBPROPSET_DBINIT), "got %s\n", debugstr_guid(&propinfoset->guidPropertySet));
|
||||
ok(propinfoset->cPropertyInfos == 14, "got %d\n", propinfoset->cPropertyInfos);
|
||||
|
@ -162,6 +164,22 @@ static void test_Properties(void)
|
|||
CoTaskMemFree(propset);
|
||||
}
|
||||
|
||||
propid = DBPROP_MULTIPLERESULTS;
|
||||
propidlist.rgPropertyIDs = &propid;
|
||||
propidlist.cPropertyIDs = 1;
|
||||
propidlist.guidPropertySet = DBPROPSET_DATASOURCEINFO;
|
||||
|
||||
propcnt = 0;
|
||||
propset = NULL;
|
||||
hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset);
|
||||
ok(hr == DB_E_ERRORSOCCURRED, "got 0x%08x\n", hr);
|
||||
ok(IsEqualGUID(&propset->guidPropertySet, &DBPROPSET_DATASOURCEINFO), "got %s\n", debugstr_guid(&propset->guidPropertySet));
|
||||
ok(propset->cProperties == 1, "got %d\n", propset->cProperties);
|
||||
ok(propset->rgProperties[0].dwPropertyID == DBPROP_MULTIPLERESULTS, "got %d\n", propset->rgProperties[0].dwPropertyID);
|
||||
ok(propset->rgProperties[0].dwStatus == DBPROPSTATUS_NOTSUPPORTED, "got %d\n", propset->rgProperties[0].dwStatus);
|
||||
|
||||
CoTaskMemFree(propset);
|
||||
|
||||
IDBProperties_Release(props);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue