The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO property which is passed in SetProperties. On return that property is marked as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow the DataSource to succeed.
-- v2: oledb32: When creating a Data Source, handle non fatal errors.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO property which is passed in SetProperties. On return that property is marked as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow the DataSource to succeed. --- dlls/oledb32/datainit.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c index 38ed5ce0e53..401a6b4dfe6 100644 --- a/dlls/oledb32/datainit.c +++ b/dlls/oledb32/datainit.c @@ -755,6 +755,11 @@ HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPCOLESTR initstring, REF }
hr = IDBProperties_SetProperties(dbprops, 1, propset); + /* Return S_OK for any successful code. */ + if (SUCCEEDED(hr)) + { + hr = S_OK; + } IDBProperties_Release(dbprops); free_dbpropset(1, propset); if (FAILED(hr))
On Tue Jun 18 10:56:00 2024 +0000, Alistair Leslie-Hughes wrote:
Yes it is but then it's propagate back to to GetDataSource, which shouldn't return this value. We don't need the trace and it can be removed. This was just an easy way to workout exactly what was wrong. Would you happy with something like
/* Return S_OK for any success code. */ if(SUCCEEDED(hr)) hr = S_OK;
Depends on what it should do, but yes, if it's not clearly documented and used return code with special meaning, we might as well mask them all.
On Tue Jun 18 11:42:50 2024 +0000, Nikolay Sivov wrote:
Depends on what it should do, but yes, if it's not clearly documented and used return code with special meaning, we might as well mask them all.
Cool. From what I can tell, it's just letting the caller know not everything wasnt successful.
Where we call it from msdao15, we only care if we have an interface and make a connection later.
Patch updated to always return S_OK in these cases.