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

« back to all changes in this revision

Viewing changes to DriverManager/SQLTablePrivilegesW.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: SQLTablePrivilegesW.c,v 1.1.1.1 2001/10/17 16:40:07 lurcher Exp $
 
30
 * $Id: SQLTablePrivilegesW.c,v 1.5 2002/12/05 17:44:31 lurcher Exp $
31
31
 *
32
32
 * $Log: SQLTablePrivilegesW.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/11/11 17:10:18  lurcher
 
38
 *
 
39
 * VMS changes
 
40
 *
 
41
 * Revision 1.3  2002/08/23 09:42:37  lurcher
 
42
 *
 
43
 * Fix some build warnings with casts, and a AIX linker mod, to include
 
44
 * deplib's on the link line, but not the libtool generated ones
 
45
 *
 
46
 * Revision 1.2  2002/07/24 08:49:52  lurcher
 
47
 *
 
48
 * Alter UNICODE support to use iconv for UNICODE-ANSI conversion
 
49
 *
33
50
 * Revision 1.1.1.1  2001/10/17 16:40:07  lurcher
34
51
 *
35
52
 * First upload to SourceForge
219
236
    }
220
237
    else
221
238
    {
 
239
        SQLCHAR *as1, *as2, *as3;
 
240
 
222
241
        if ( !CHECK_SQLTABLEPRIVILEGES( statement -> connection ))
223
242
        {
224
243
            dm_log_write( __FILE__, 
236
255
            return function_return( statement, SQL_ERROR );
237
256
        }
238
257
 
239
 
        unicode_to_ansi( sz_catalog_name, cb_catalog_name );
240
 
        unicode_to_ansi( sz_schema_name, cb_schema_name );
241
 
        unicode_to_ansi( sz_table_name, cb_table_name );
 
258
        as1 = (SQLCHAR*) unicode_to_ansi_alloc( sz_catalog_name, cb_catalog_name, statement -> connection );
 
259
        as2 = (SQLCHAR*) unicode_to_ansi_alloc( sz_schema_name, cb_schema_name, statement -> connection );
 
260
        as3 = (SQLCHAR*) unicode_to_ansi_alloc( sz_table_name, cb_table_name, statement -> connection );
242
261
 
243
262
        ret = SQLTABLEPRIVILEGES( statement -> connection ,
244
263
                statement -> driver_stmt,
245
 
                sz_catalog_name,
 
264
                as1,
246
265
                cb_catalog_name,
247
 
                sz_schema_name,
 
266
                as2,
248
267
                cb_schema_name,
249
 
                sz_table_name,
 
268
                as3,
250
269
                cb_table_name );
251
270
 
252
 
        ansi_back_to_unicode((char *) sz_catalog_name, cb_catalog_name );
253
 
        ansi_back_to_unicode((char *) sz_schema_name, cb_schema_name );
254
 
        ansi_back_to_unicode((char *) sz_table_name, cb_table_name );
 
271
        if ( as1 ) free( as1 );
 
272
        if ( as2 ) free( as2 );
 
273
        if ( as3 ) free( as3 );
255
274
    }
256
275
 
257
276
    if ( SQL_SUCCEEDED( ret ))
275
294
    {
276
295
        sprintf( statement -> msg, 
277
296
                "\n\t\tExit:[%s]",
278
 
                    __get_return_status( ret ));
 
297
                    __get_return_status( ret, s1 ));
279
298
 
280
299
        dm_log_write( __FILE__, 
281
300
                __LINE__,