1 /*********************************************************************
2 *
3 * unixODBC Cursor Library
4 *
5 * Created by Nick Gorham
6 * (nick@lurcher.org).
7 *
8 * copyright (c) 1999 Nick Gorham
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 **********************************************************************
25 *
26 * $Id: SQLEndTran.c,v 1.3 2009/02/18 17:59:17 lurcher Exp $
27 *
28 * $Log: SQLEndTran.c,v $
29 * Revision 1.3 2009/02/18 17:59:17 lurcher
30 * Shift to using config.h, the compile lines were making it hard to spot warnings
31 *
32 * Revision 1.2 2009/02/17 09:47:45 lurcher
33 * Clear up a number of bugs
34 *
35 * Revision 1.1.1.1 2001/10/17 16:40:15 lurcher
36 *
37 * First upload to SourceForge
38 *
39 * Revision 1.1.1.1 2000/09/04 16:42:52 nick
40 * Imported Sources
41 *
42 * Revision 1.1 1999/09/19 22:22:50 ngorham
43 *
44 *
45 * Added first cursor library work, read only at the moment and only works
46 * with selects with no where clause
47 *
48 *
49 **********************************************************************/
50
51 #include <config.h>
52 #include "cursorlibrary.h"
53
CLEndTran(SQLSMALLINT handle_type,SQLHANDLE handle,SQLSMALLINT completion_type)54 SQLRETURN CLEndTran( SQLSMALLINT handle_type,
55 SQLHANDLE handle,
56 SQLSMALLINT completion_type )
57 {
58 switch ( handle_type )
59 {
60 case SQL_HANDLE_ENV:
61 /*
62 * the driver manager will not call this
63 */
64 return SQL_ERROR;
65 break;
66
67 case SQL_HANDLE_DBC:
68 {
69 CLHDBC cl_connection = (CLHDBC) handle;
70
71 return SQLENDTRAN( cl_connection,
72 SQL_HANDLE_DBC,
73 cl_connection -> driver_dbc,
74 completion_type );
75 }
76 break;
77
78 default:
79 return SQL_ERROR;
80 }
81 }
82