1 | --- DriverManager/SQLConnect.c.orig 2007-07-01 22:58:53.000000000 +0200 |
---|
2 | +++ DriverManager/SQLConnect.c 2007-07-01 22:57:10.000000000 +0200 |
---|
3 | @@ -3647,6 +3647,8 @@ |
---|
4 | |
---|
5 | return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); |
---|
6 | } |
---|
7 | + |
---|
8 | + name_length1 = len; |
---|
9 | } |
---|
10 | else |
---|
11 | { |
---|
12 | @@ -3688,6 +3690,7 @@ |
---|
13 | else |
---|
14 | { |
---|
15 | strcpy( dsn, "DEFAULT" ); |
---|
16 | + name_length1 = 8; |
---|
17 | } |
---|
18 | |
---|
19 | /* |
---|
20 | @@ -3837,6 +3840,22 @@ |
---|
21 | |
---|
22 | return function_return( SQL_HANDLE_DBC, connection, SQL_ERROR ); |
---|
23 | } |
---|
24 | + |
---|
25 | + if (name_length2==SQL_NTS) { |
---|
26 | + if (user_name!=(SQLCHAR*)0) { |
---|
27 | + name_length2 = strlen((char*)user_name); |
---|
28 | + } else { |
---|
29 | + name_length2 = 0; |
---|
30 | + } |
---|
31 | + } |
---|
32 | + |
---|
33 | + if (name_length3==SQL_NTS) { |
---|
34 | + if (authentication!=(SQLCHAR*)0) { |
---|
35 | + name_length3 = strlen((char*)authentication); |
---|
36 | + } else { |
---|
37 | + name_length3 = 0; |
---|
38 | + } |
---|
39 | + } |
---|
40 | |
---|
41 | if ( CHECK_SQLCONNECT( connection )) |
---|
42 | { |
---|
43 | @@ -3855,7 +3874,7 @@ |
---|
44 | |
---|
45 | ret_from_connect = SQLCONNECT( connection, |
---|
46 | connection -> driver_dbc, |
---|
47 | - dsn, SQL_NTS, |
---|
48 | + dsn, name_length1, |
---|
49 | user_name, name_length2, |
---|
50 | authentication, name_length3 ); |
---|
51 | |
---|
52 | @@ -3982,7 +4001,7 @@ |
---|
53 | |
---|
54 | ret_from_connect = SQLCONNECTW( connection, |
---|
55 | connection -> driver_dbc, |
---|
56 | - uc_dsn, SQL_NTS, |
---|
57 | + uc_dsn, name_length1, |
---|
58 | uc_user, name_length2, |
---|
59 | uc_auth, name_length3 ); |
---|
60 | |
---|