From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- include/sqlucode.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/sqlucode.h b/include/sqlucode.h index f1eaace87c1..2fde3003ece 100644 --- a/include/sqlucode.h +++ b/include/sqlucode.h @@ -43,6 +43,11 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable);
+SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, + SQLHWND WindowHandle, WCHAR *InConnectionString, + SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, + SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion); + SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, SQLWCHAR *StatementText, SQLINTEGER TextLength);
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/msdasql/msdasql_main.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c index 017a2517a72..f53ccfcd5ed 100644 --- a/dlls/msdasql/msdasql_main.c +++ b/dlls/msdasql/msdasql_main.c @@ -532,24 +532,28 @@ static HRESULT WINAPI dbinit_Initialize(IDBInitialize *iface) struct msdasql *provider = impl_from_IDBInitialize(iface); int i; SQLRETURN ret; + WCHAR connection[1024] = {0}, outstr[1024];
FIXME("%p semi-stub\n", provider);
- for(i=0; i < sizeof(provider->properties); i++) + for(i=0; i < ARRAY_SIZE(provider->properties); i++) { if (provider->properties[i].id == DBPROP_INIT_DATASOURCE) - break; - } - - if (i >= sizeof(provider->properties)) - { - ERR("Datasource not found\n"); - return E_FAIL; + { + wcscat(connection, L"DSN="); + wcscat(connection, V_BSTR(&provider->properties[i].value)); + wcscat(connection, L";"); + } + else if (provider->properties[i].id == DBPROP_INIT_PROVIDERSTRING) + { + wcscat(connection, V_BSTR(&provider->properties[i].value)); + wcscat(connection, L";"); + } }
- ret = SQLConnectW( provider->hdbc, (SQLWCHAR *)V_BSTR(&provider->properties[i].value), - SQL_NTS, NULL, SQL_NTS, NULL, SQL_NTS ); - TRACE("SQLConnectW ret %d\n", ret); + ret = SQLDriverConnectW( provider->hdbc, NULL, connection, wcslen(connection), + outstr, ARRAY_SIZE(outstr), NULL, 0); + TRACE("SQLDriverConnectW ret %d\n", ret); if (ret != SQL_SUCCESS) { dump_sql_diag_records(SQL_HANDLE_DBC, provider->hdbc);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129200
Your paranoid android.
=== debian11 (32 bit report) ===
msado15: Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x6ab49d18).