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

« back to all changes in this revision

Viewing changes to DriverManager/SQLSpecialColumnsW.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: SQLSpecialColumnsW.c,v 1.1.1.1 2001/10/17 16:40:07 lurcher Exp $
 
30
 * $Id: SQLSpecialColumnsW.c,v 1.4 2002/12/05 17:44:31 lurcher Exp $
31
31
 *
32
32
 * $Log: SQLSpecialColumnsW.c,v $
 
33
 * Revision 1.4  2002/12/05 17:44:31  lurcher
 
34
 *
 
35
 * Display unknown return values in return logging
 
36
 *
 
37
 * Revision 1.3  2002/08/23 09:42:37  lurcher
 
38
 *
 
39
 * Fix some build warnings with casts, and a AIX linker mod, to include
 
40
 * deplib's on the link line, but not the libtool generated ones
 
41
 *
 
42
 * Revision 1.2  2002/07/24 08:49:52  lurcher
 
43
 *
 
44
 * Alter UNICODE support to use iconv for UNICODE-ANSI conversion
 
45
 *
33
46
 * Revision 1.1.1.1  2001/10/17 16:40:07  lurcher
34
47
 *
35
48
 * First upload to SourceForge
302
315
    }
303
316
    else
304
317
    {
 
318
        SQLCHAR *as1, *as2, *as3; 
 
319
 
305
320
        if ( !CHECK_SQLSPECIALCOLUMNS( statement -> connection ))
306
321
        {
307
322
            dm_log_write( __FILE__, 
319
334
            return function_return( statement, SQL_ERROR );
320
335
        }
321
336
 
322
 
        unicode_to_ansi( catalog_name, name_length1 );
323
 
        unicode_to_ansi( schema_name, name_length2 );
324
 
        unicode_to_ansi( table_name, name_length3 );
 
337
        as1 = (SQLCHAR*) unicode_to_ansi_alloc( catalog_name, name_length1, statement -> connection );
 
338
        as2 = (SQLCHAR*) unicode_to_ansi_alloc( schema_name, name_length2, statement -> connection );
 
339
        as3 = (SQLCHAR*) unicode_to_ansi_alloc( table_name, name_length3, statement -> connection );
325
340
 
326
341
        ret = SQLSPECIALCOLUMNS( statement -> connection ,
327
342
                statement -> driver_stmt,
328
343
                identifier_type,
329
 
                catalog_name,
 
344
                as1,
330
345
                name_length1,
331
 
                schema_name,
 
346
                as2,
332
347
                name_length2,
333
 
                table_name,
 
348
                as3,
334
349
                name_length3,
335
350
                scope,
336
351
                nullable );
337
352
 
338
 
        ansi_back_to_unicode((char*) catalog_name, name_length1 );
339
 
        ansi_back_to_unicode((char*) schema_name, name_length2 );
340
 
        ansi_back_to_unicode((char*) table_name, name_length3 );
 
353
        if ( as1 ) free( as1 );
 
354
        if ( as2 ) free( as2 );
 
355
        if ( as3 ) free( as3 );
341
356
    }
342
357
 
343
358
    if ( SQL_SUCCEEDED( ret ))
371
386
    {
372
387
        sprintf( statement -> msg, 
373
388
                "\n\t\tExit:[%s]",
374
 
                    __get_return_status( ret ));
 
389
                    __get_return_status( ret, s1 ));
375
390
 
376
391
        dm_log_write( __FILE__, 
377
392
                __LINE__,