Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a40d67e0
Commit
a40d67e0
authored
Feb 08, 2023
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Use SQLDriverConnectW to connect to the ODBC driver.
parent
96e18688
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
msdasql_main.c
dlls/msdasql/msdasql_main.c
+21
-12
No files found.
dlls/msdasql/msdasql_main.c
View file @
a40d67e0
...
@@ -530,26 +530,35 @@ static ULONG WINAPI dbinit_Release(IDBInitialize *iface)
...
@@ -530,26 +530,35 @@ static ULONG WINAPI dbinit_Release(IDBInitialize *iface)
static
HRESULT
WINAPI
dbinit_Initialize
(
IDBInitialize
*
iface
)
static
HRESULT
WINAPI
dbinit_Initialize
(
IDBInitialize
*
iface
)
{
{
struct
msdasql
*
provider
=
impl_from_IDBInitialize
(
iface
);
struct
msdasql
*
provider
=
impl_from_IDBInitialize
(
iface
);
int
i
;
int
i
,
len
;
SQLRETURN
ret
;
SQLRETURN
ret
;
WCHAR
connection
[
1024
],
*
p
=
connection
,
outstr
[
1024
];
FIXME
(
"%p semi-stub
\n
"
,
provider
);
FIXME
(
"%p semi-stub
\n
"
,
provider
);
for
(
i
=
0
;
i
<
sizeof
(
provider
->
properties
);
i
++
)
*
p
=
0
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
provider
->
properties
);
i
++
)
{
{
if
(
provider
->
properties
[
i
].
id
==
DBPROP_INIT_DATASOURCE
)
if
(
provider
->
properties
[
i
].
id
==
DBPROP_INIT_DATASOURCE
)
break
;
{
}
len
=
swprintf
(
p
,
ARRAY_SIZE
(
connection
)
-
(
p
-
connection
),
L"DSN=%s;"
,
V_BSTR
(
&
provider
->
properties
[
i
].
value
));
if
(
i
>=
sizeof
(
provider
->
properties
))
p
+=
len
;
{
}
ERR
(
"Datasource not found
\n
"
);
else
if
(
provider
->
properties
[
i
].
id
==
DBPROP_INIT_PROVIDERSTRING
)
return
E_FAIL
;
{
if
(
V_VT
(
&
provider
->
properties
[
i
].
value
)
==
VT_BSTR
&&
SysStringLen
(
V_BSTR
(
&
provider
->
properties
[
i
].
value
))
)
{
len
=
swprintf
(
p
,
ARRAY_SIZE
(
connection
)
-
(
p
-
connection
),
L"%s;"
,
V_BSTR
(
&
provider
->
properties
[
i
].
value
));
p
+=
len
;
}
}
}
}
ret
=
SQL
ConnectW
(
provider
->
hdbc
,
(
SQLWCHAR
*
)
V_BSTR
(
&
provider
->
properties
[
i
].
value
),
ret
=
SQL
DriverConnectW
(
provider
->
hdbc
,
NULL
,
connection
,
wcslen
(
connection
),
SQL_NTS
,
NULL
,
SQL_NTS
,
NULL
,
SQL_NTS
);
outstr
,
ARRAY_SIZE
(
outstr
),
NULL
,
0
);
TRACE
(
"SQLConnectW ret %d
\n
"
,
ret
);
TRACE
(
"SQL
Driver
ConnectW ret %d
\n
"
,
ret
);
if
(
ret
!=
SQL_SUCCESS
)
if
(
ret
!=
SQL_SUCCESS
)
{
{
dump_sql_diag_records
(
SQL_HANDLE_DBC
,
provider
->
hdbc
);
dump_sql_diag_records
(
SQL_HANDLE_DBC
,
provider
->
hdbc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment