Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msdasql/session.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c index 9f5c6ef4a53..0187d75f67b 100644 --- a/dlls/msdasql/session.c +++ b/dlls/msdasql/session.c @@ -1151,7 +1151,41 @@ static HRESULT WINAPI command_prop_SetProperties(ICommandProperties *iface, ULON DBPROPSET propertyset[]) { struct command *command = impl_from_ICommandProperties( iface ); - FIXME("%p %p\n", command, propertyset); + int i, j, k; + + TRACE("%p %d, %p\n", command, count, propertyset); + + for(i=0; i < count; i++) + { + TRACE("set %s, count %d\n", debugstr_guid(&propertyset[i].guidPropertySet), propertyset[i].cProperties); + for(j=0; j < propertyset[i].cProperties; j++) + { + for(k=0; k < ARRAY_SIZE(command->properties); k++) + { + if (command->properties[k].property_id == propertyset[i].rgProperties[j].dwPropertyID) + { + TRACE("Found property 0x%08x\n", command->properties[k].property_id); + if (command->properties[k].flags & DBPROPFLAGS_WRITE) + { + if (command->properties[k].vartype == VT_BOOL) + { + command->properties[k].value = V_BOOL(&propertyset[i].rgProperties[j].vValue); + } + else if (command->properties[k].vartype == VT_I4) + { + command->properties[k].value = V_I4(&propertyset[i].rgProperties[j].vValue); + } + else + ERR("Unknown variant type %d\n", command->properties[j].vartype); + } + else + WARN("Attempting to set Readonly property\n"); + + break; + } + } + } + } return S_OK; }