]>
git.saurik.com Git - wxWidgets.git/blob - src/iodbc/itrace.c
3 Copyright (C) 1995 by Ke Jin <kejin@empress.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
16 #include <../iodbc/iodbc.h>
18 #include <../iodbc/isql.h>
19 #include <../iodbc/isqlext.h>
21 #include <../iodbc/dlproc.h>
23 #include <../iodbc/itrace.h>
25 #include <../iodbc/herr.h>
26 #include <../iodbc/henv.h>
27 #include "../iodbc/henv.ci"
31 static int printreturn(void FAR
* istm
, int ret
)
33 FILE FAR
* stm
= (FILE FAR
*)istm
;
34 char FAR
* ptr
= "Invalid return value";
42 case SQL_SUCCESS_WITH_INFO
:
43 ptr
= "SQL_SUCCESS_WITH_INFO";
46 case SQL_NO_DATA_FOUND
:
47 ptr
= "SQL_NO_DATA_FOUND";
51 ptr
= "SQL_NEED_DATA";
54 case SQL_INVALID_HANDLE
:
55 ptr
= "SQL_INVALID_HANDLE";
62 case SQL_STILL_EXECUTING
:
63 ptr
= "SQL_STILL_EXECUTING";
70 fprintf( stm
, "%s\n", ptr
);
76 HPROC
_iodbcdm_gettrproc(void FAR
* istm
, int procid
, int type
)
78 FILE FAR
* stm
= (FILE FAR
*)istm
;
80 if( type
== TRACE_TYPE_DM2DRV
)
84 for(i
=0;j
!= en_NullProc
;i
++)
86 j
= odbcapi_symtab
[i
].en_idx
;
90 fprintf( stm
, "\n%s ( ... )\n",
91 odbcapi_symtab
[i
].symbol
);
98 if( type
== TRACE_TYPE_RETURN
)
100 return (HPROC
)printreturn
;
103 return SQL_NULL_HPROC
;