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

« back to all changes in this revision

Viewing changes to DriverManager/SQLPrepareW.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: SQLPrepareW.c,v 1.1.1.1 2001/10/17 16:40:06 lurcher Exp $
 
30
 * $Id: SQLPrepareW.c,v 1.4 2002/12/05 17:44:31 lurcher Exp $
31
31
 *
32
32
 * $Log: SQLPrepareW.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:06  lurcher
34
47
 *
35
48
 * First upload to SourceForge
56
69
    DMHSTMT statement = (DMHSTMT) statement_handle;
57
70
    SQLRETURN ret;
58
71
    SQLCHAR *s1;
 
72
    SQLCHAR s2[ 100 + LOG_MESSAGE_LEN ];
59
73
 
60
74
    /*
61
75
     * check statement
225
239
    }
226
240
    else
227
241
    {
 
242
        SQLCHAR *as1;
 
243
 
228
244
        if ( !CHECK_SQLPREPARE( statement -> connection ))
229
245
        {
230
246
            dm_log_write( __FILE__, 
242
258
            return function_return( statement, SQL_ERROR );
243
259
        }
244
260
 
245
 
        unicode_to_ansi( statement_text, text_length );
 
261
        as1 = (SQLCHAR*) unicode_to_ansi_alloc( statement_text, text_length, statement -> connection );
246
262
 
247
263
        ret = SQLPREPARE( statement -> connection ,
248
264
                statement -> driver_stmt,
249
 
                statement_text,
 
265
                as1, 
250
266
                text_length );
251
267
 
252
 
        ansi_back_to_unicode((char*) statement_text, text_length );
 
268
        if ( as1 ) free( as1 );
253
269
    }
254
270
 
255
271
    if ( SQL_SUCCEEDED( ret ))
297
313
    {
298
314
        sprintf( statement -> msg, 
299
315
                "\n\t\tExit:[%s]",
300
 
                    __get_return_status( ret ));
 
316
                    __get_return_status( ret, s2 ));
301
317
 
302
318
        dm_log_write( __FILE__, 
303
319
                __LINE__,