~ubuntu-branches/debian/sid/unixodbc/sid

« back to all changes in this revision

Viewing changes to DriverManager/SQLSetConnectOptionW.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2004-10-15 03:07:52 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041015030752-dzw4vhxlgycz3woj
Tags: 2.2.4-11
Brown paper bag me: conflicts do not write themselves just because
you add a line to the changelog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 *
28
28
 **********************************************************************
29
29
 *
30
 
 * $Id: SQLSetConnectOptionW.c,v 1.2 2001/12/13 13:00:32 lurcher Exp $
 
30
 * $Id: SQLSetConnectOptionW.c,v 1.5 2002/12/05 17:44:31 lurcher Exp $
31
31
 *
32
32
 * $Log: SQLSetConnectOptionW.c,v $
 
33
 * Revision 1.5  2002/12/05 17:44:31  lurcher
 
34
 *
 
35
 * Display unknown return values in return logging
 
36
 *
 
37
 * Revision 1.4  2002/07/24 08:49:52  lurcher
 
38
 *
 
39
 * Alter UNICODE support to use iconv for UNICODE-ANSI conversion
 
40
 *
 
41
 * Revision 1.3  2002/01/30 12:20:02  lurcher
 
42
 *
 
43
 * Add MyODBC 3 driver source
 
44
 *
33
45
 * Revision 1.2  2001/12/13 13:00:32  lurcher
34
46
 *
35
47
 * Remove most if not all warnings on 64 bit platforms
97
109
            {
98
110
                free( log_info.log_file_name );
99
111
            }
100
 
            unicode_to_ansi((SQLWCHAR*) value, SQL_NTS );
101
 
            log_info.log_file_name = strdup((char*) value );
 
112
            log_info.log_file_name = unicode_to_ansi_alloc((SQLWCHAR *) value, SQL_NTS, connection );
102
113
        }
103
114
        return SQL_SUCCESS;
104
115
    }
235
246
     * is it something overridden
236
247
     */
237
248
 
238
 
    value = (SQLUINTEGER) __attr_override( connection, SQL_HANDLE_DBC, option, (void*) value, NULL );
 
249
    value = (SQLULEN) __attr_override( connection, SQL_HANDLE_DBC, option, (void*) value, NULL );
239
250
 
240
251
    if ( option == SQL_ODBC_CURSORS )
241
252
    {
255
266
            connection -> auto_commit = ( SQLINTEGER ) value;
256
267
            connection -> auto_commit_set = 1;
257
268
        }
 
269
        else if ( option == SQL_ATTR_QUIET_MODE )
 
270
        {
 
271
            connection -> quite_mode = ( SQLLEN ) value;
 
272
            connection -> quite_mode_set = 1;
 
273
        }
 
274
        else
 
275
        {
 
276
            /*
 
277
             * save any unknown attributes untill connect
 
278
             */
 
279
 
 
280
            struct save_attr *sa = calloc( 1, sizeof( struct save_attr ));
 
281
 
 
282
            sa -> attr_type = option;
 
283
            sa -> int_attr = ( SQLINTEGER ) value;
 
284
            sa -> next = connection -> save_attr;
 
285
            connection -> save_attr = sa;
 
286
        }
258
287
 
259
288
        if ( log_info.log_flag )
260
289
        {
261
290
            sprintf( connection -> msg, 
262
291
                    "\n\t\tExit:[%s]",
263
 
                        __get_return_status( SQL_SUCCESS ));
 
292
                        __get_return_status( SQL_SUCCESS, s1 ));
264
293
 
265
294
            dm_log_write( __FILE__, 
266
295
                    __LINE__, 
328
357
        {
329
358
            sprintf( connection -> msg, 
330
359
                    "\n\t\tExit:[%s]",
331
 
                        __get_return_status( ret ));
 
360
                        __get_return_status( ret, s1 ));
332
361
 
333
362
            dm_log_write( __FILE__, 
334
363
                    __LINE__,