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

« back to all changes in this revision

Viewing changes to DriverManager/SQLMoreResults.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: SQLMoreResults.c,v 1.1.1.1 2001/10/17 16:40:06 lurcher Exp $
 
30
 * $Id: SQLMoreResults.c,v 1.3 2002/12/05 17:44:31 lurcher Exp $
31
31
 *
32
32
 * $Log: SQLMoreResults.c,v $
 
33
 * Revision 1.3  2002/12/05 17:44:31  lurcher
 
34
 *
 
35
 * Display unknown return values in return logging
 
36
 *
 
37
 * Revision 1.2  2002/08/15 08:10:33  lurcher
 
38
 *
 
39
 * Couple of small fixes from John L Miller
 
40
 *
33
41
 * Revision 1.1.1.1  2001/10/17 16:40:06  lurcher
34
42
 *
35
43
 * First upload to SourceForge
97
105
 
98
106
#include "drivermanager.h"
99
107
 
100
 
static char const rcsid[]= "$RCSfile: SQLMoreResults.c,v $ $Revision: 1.1.1.1 $";
 
108
static char const rcsid[]= "$RCSfile: SQLMoreResults.c,v $ $Revision: 1.3 $";
101
109
 
102
110
SQLRETURN SQLMoreResults( SQLHSTMT statement_handle )
103
111
{
104
112
    DMHSTMT statement = (DMHSTMT) statement_handle;
105
113
    SQLRETURN ret;
 
114
    SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ];
106
115
 
107
116
    /*
108
117
     * check statement
146
155
    {
147
156
        sprintf( statement -> msg, 
148
157
                "\n\t\tExit:[%s]",
149
 
                    __get_return_status( SQL_NO_DATA ));
 
158
                    __get_return_status( SQL_NO_DATA, s1 ));
150
159
 
151
160
        dm_log_write( __FILE__, 
152
161
                __LINE__, 
232
241
        SQLNUMRESULTCOLS( statement -> connection,
233
242
                statement -> driver_stmt, &statement -> numcols );
234
243
 
235
 
        if ( statement -> numcols >= 0 )
 
244
        if ( statement -> numcols == 0 )
 
245
        {
 
246
            statement -> state = STATE_S4;
 
247
        }
 
248
        else
236
249
        {
237
250
            statement -> state = STATE_S5;
238
251
        }
239
 
        else
240
 
        {
241
 
            statement -> state = STATE_S4;
242
 
        }
243
252
    }
244
253
    else if ( ret == SQL_STILL_EXECUTING )
245
254
    {
275
284
    {
276
285
        sprintf( statement -> msg, 
277
286
                "\n\t\tExit:[%s]",
278
 
                    __get_return_status( ret ));
 
287
                    __get_return_status( ret, s1 ));
279
288
 
280
289
        dm_log_write( __FILE__, 
281
290
                __LINE__,