Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msado15/connection.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index a3c9a450be6..2d43aff787f 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -339,51 +339,49 @@ static HRESULT WINAPI connection_Execute( _Connection *iface, BSTR command, VARI { struct connection *connection = impl_from_Connection( iface ); HRESULT hr; - ICommandText *command_text; - DBROWCOUNT affected; - IUnknown *rowset; _Recordset *recordset; - ADORecordsetConstruction *construct; + VARIANT source, active; + IDispatch *dispatch;
FIXME( "%p, %s, %p, 0x%08x, %p Semi-stub\n", iface, debugstr_w(command), records_affected, options, record_set );
if (connection->state == adStateClosed) return MAKE_ADO_HRESULT( adErrObjectClosed );
- hr = create_command_text(connection->session, command, &command_text); + hr = Recordset_create( (void**)&recordset); if (FAILED(hr)) + { return hr; + }
- hr = ICommandText_Execute(command_text, NULL, &IID_IUnknown, NULL, &affected, &rowset); - ICommandText_Release(command_text); - if (FAILED(hr)) - return hr; + _Recordset_put_CursorLocation(recordset, connection->location);
- hr = Recordset_create( (void**)&recordset); + V_VT(&source) = VT_BSTR; + V_BSTR(&source) = command; + + hr = _Connection_QueryInterface(&connection->Connection_iface, &IID_IDispatch, (void**)&dispatch); if (FAILED(hr)) { - IUnknown_Release(rowset); + _Recordset_Release(recordset); return hr; }
- hr = _Recordset_QueryInterface(recordset, &IID_ADORecordsetConstruction, (void**)&construct); + V_VT(&active) = VT_DISPATCH; + V_DISPATCH(&active) = dispatch; + + hr = _Recordset_Open(recordset, source, active, adOpenDynamic, adLockPessimistic, 0); + VariantClear(&active); if (FAILED(hr)) { - IUnknown_Release(rowset); _Recordset_Release(recordset); return hr; }
- ADORecordsetConstruction_put_Rowset(construct, rowset); - ADORecordsetConstruction_Release(construct); - IUnknown_Release(rowset); - if (records_affected) { V_VT(records_affected) = VT_I4; - V_I4(records_affected) = affected; + _Recordset_get_RecordCount(recordset, &V_I4(records_affected)); }
- _Recordset_put_CursorLocation(recordset, connection->location); *record_set = recordset;
return hr;
On Fri, 2021-04-30 at 16:56 +1000, Alistair Leslie-Hughes wrote: Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msado15/connection.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index a3c9a450be6..2d43aff787f 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -339,51 +339,49 @@ static HRESULT WINAPI connection_Execute( _Connection *iface, BSTR command, VARI { struct connection *connection = impl_from_Connection( iface ); HRESULT hr; - ICommandText *command_text; - DBROWCOUNT affected; - IUnknown *rowset; _Recordset *recordset; - ADORecordsetConstruction *construct; + VARIANT source, active; + IDispatch *dispatch; FIXME( "%p, %s, %p, 0x%08x, %p Semi-stub\n", iface, debugstr_w(command), records_affected, options, record_set );
if (connection->state == adStateClosed) return MAKE_ADO_HRESULT( adErrObjectClosed );
- hr = create_command_text(connection->session, command, &command_text);
Since you're no longer using create_command_text here, please move the implementation close to its only user and make it static.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=89610
Your paranoid android.
=== debiant2 (build log) ===
error: corrupt patch at line 12 Task: Patch failed to apply
=== debiant2 (build log) ===
error: corrupt patch at line 12 Task: Patch failed to apply