1 | /********************************************************************* |
2 | * |
3 | * This is based on code created by Peter Harvey, |
4 | * (pharvey@codebydesign.com). |
5 | * |
6 | * Modified and extended by Nick Gorham |
7 | * (nick@lurcher.org). |
8 | * |
9 | * Any bugs or problems should be considered the fault of Nick and not |
10 | * Peter. |
11 | * |
12 | * copyright (c) 1999 Nick Gorham |
13 | * |
14 | * This library is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU Lesser General Public |
16 | * License as published by the Free Software Foundation; either |
17 | * version 2 of the License, or (at your option) any later version. |
18 | * |
19 | * This library is distributed in the hope that it will be useful, |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
22 | * Lesser General Public License for more details. |
23 | * |
24 | * You should have received a copy of the GNU Lesser General Public |
25 | * License along with this library; if not, write to the Free Software |
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27 | * |
28 | ********************************************************************** |
29 | * |
30 | * $Id: SQLAllocConnect.c,v 1.2 2009/02/18 17:59:08 lurcher Exp $ |
31 | * |
32 | * $Log: SQLAllocConnect.c,v $ |
33 | * Revision 1.2 2009/02/18 17:59:08 lurcher |
34 | * Shift to using config.h, the compile lines were making it hard to spot warnings |
35 | * |
36 | * Revision 1.1.1.1 2001/10/17 16:40:03 lurcher |
37 | * |
38 | * First upload to SourceForge |
39 | * |
40 | * Revision 1.1.1.1 2000/09/04 16:42:52 nick |
41 | * Imported Sources |
42 | * |
43 | * Revision 1.2 1999/07/04 21:05:06 ngorham |
44 | * |
45 | * Add LGPL Headers to code |
46 | * |
47 | * Revision 1.1.1.1 1999/05/29 13:41:04 sShandyb |
48 | * first go at it |
49 | * |
50 | * Revision 1.4 1999/06/02 23:48:45 ngorham |
51 | * |
52 | * Added more 3-2 mapping |
53 | * |
54 | * |
55 | * Revision 1.3 1999/06/02 20:01:00 ngorham |
56 | * |
57 | * Attempt to fix previous botched log message |
58 | * |
59 | * Revision 1.2 1999/06/02 19:57:20 ngorham |
60 | * |
61 | * Added code to check if a attempt is being made to compile with a C++ |
62 | * Compiler, and issue a message. |
63 | * Start work on the ODBC2-3 conversions. |
64 | * |
65 | * Revision 1.1.1.1 1999/05/27 18:23:17 pharvey |
66 | * Imported sources |
67 | * |
68 | * Revision 1.1 1999/04/25 23:02:41 nick |
69 | * Initial revision |
70 | * |
71 | * |
72 | **********************************************************************/ |
73 | |
74 | #include <config.h> |
75 | #ifdef __cplusplus |
76 | #error "This code must be compiled with a C compiler," |
77 | #error "not a C++ one, this is due in part to Microsoft" |
78 | #error "defining SQLCHAR as unsigned, this means all the" |
79 | #error "standard library code confilicts." |
80 | #error "" |
81 | #error "Alter the compiler line in Common.mk to ecgs or" |
82 | #error "gcc and remake. This will correctly compile" |
83 | #error "the C++ elements" |
84 | #error "" |
85 | #endif |
86 | |
87 | #include "drivermanager.h" |
88 | |
89 | static char const rcsid[]= "$RCSfile: SQLAllocConnect.c,v $ $Revision: 1.2 $" ; |
90 | |
91 | SQLRETURN SQLAllocConnect( SQLHENV environment_handle, |
92 | SQLHDBC *connection_handle ) |
93 | { |
94 | return __SQLAllocHandle( SQL_HANDLE_DBC, |
95 | environment_handle, |
96 | connection_handle, |
97 | SQL_OV_ODBC2 ); |
98 | } |
99 | |