summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/mfc40/sqltypes.h
blob: ae9d39e2cc796b09c1a2fd2c62d70f6079dcf0af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/*********************************************************************
** SQLTYPES.H - This file defines the types used in ODBC
**
** (C) Copyright 1995 By Microsoft Corp.
**
**     Created 4/10/95 for 2.50 specification
*********************************************************************/

#ifndef __SQLTYPES
#define __SQLTYPES

/* if ODBCVER is not defined, assume version 2.50 */
#ifndef ODBCVER
#define ODBCVER	0x0250
#endif

/* environment specific definitions */
#ifndef EXPORT
#define EXPORT   _export
#endif

/* define WINDOWS */
/* _WINDOWS_ is defined in windows.h for 32 bit    */
/* _INC_WINDOWS is defined in windows.h for 16 bit */
#if (defined(_WINDOWS_) || defined(_INC_WINDOWS)) && !defined(WINDOWS)
#define WINDOWS
#endif

#ifdef WIN32
#define SQL_API  __stdcall
#elif defined(WINDOWS)
#define SQL_API  EXPORT CALLBACK
#else
#define SQL_API
#endif


#ifndef RC_INVOKED

#if !defined(WINDOWS) && !defined(FAR)
#define FAR
#endif

/* SQL portable types for C */
typedef unsigned char           UCHAR;
typedef signed char             SCHAR;
typedef long int                SDWORD;
typedef short int               SWORD;
typedef unsigned long int       UDWORD;
typedef unsigned short int      UWORD;

#if (ODBCVER >= 0x0200)
typedef signed long             SLONG;
typedef signed short            SSHORT;
typedef unsigned long           ULONG;
typedef unsigned short          USHORT;
#endif  /* ODBCVER >= 0x0200 */
typedef double                  SDOUBLE;
#if defined(WIN32)
typedef double            LDOUBLE; /* long double == short double in Win32 */
#elif defined(WINDOWS)
typedef long double             LDOUBLE;
#else
typedef double                  LDOUBLE;
#endif
typedef float                   SFLOAT;

typedef void FAR *              PTR;

typedef void FAR *              HENV;
typedef void FAR *              HDBC;
typedef void FAR *              HSTMT;

typedef signed short            RETCODE;

typedef UCHAR                   SQLCHAR;
typedef SCHAR                   SQLSCHAR;
typedef SDWORD                  SQLINTEGER;
typedef SWORD                   SQLSMALLINT;
typedef UDWORD                  SQLUINTEGER;
typedef UWORD                   SQLUSMALLINT;

typedef void FAR *              SQLPOINTER;

#if defined(WINDOWS) || defined(WIN32)
typedef HENV			SQLHENV;
typedef HDBC			SQLHDBC;
typedef HSTMT			SQLHSTMT;
#else
typedef SQLINTEGER		SQLHENV;
typedef SQLINTEGER		SQLHDBC;
typedef SQLINTEGER		SQLHSTMT;
#endif

typedef SQLSMALLINT             SQLRETURN;

#if defined(WINDOWS) || defined(WIN32) || defined(OS2)
typedef HWND                    SQLHWND;
#elif defined (UNIX)
typedef Widget                  SQLHWND;
#else
/* placehold for future O/S GUI window handle definition */
typedef SQLPOINTER              SQLHWND;        
#endif

/* transfer types for DATE, TIME, TIMESTAMP */
typedef struct tagDATE_STRUCT
{
        SQLSMALLINT    year;
        SQLUSMALLINT   month;
        SQLUSMALLINT   day;
} DATE_STRUCT;

typedef struct tagTIME_STRUCT
{
        SQLUSMALLINT   hour;
        SQLUSMALLINT   minute;
        SQLUSMALLINT   second;
} TIME_STRUCT;

typedef struct tagTIMESTAMP_STRUCT
{
        SQLSMALLINT    year;
        SQLUSMALLINT   month;
        SQLUSMALLINT   day;
        SQLUSMALLINT   hour;
        SQLUSMALLINT   minute;
        SQLUSMALLINT   second;
        SQLUINTEGER    fraction;
} TIMESTAMP_STRUCT;

#if (ODBCVER >= 0x0200)
typedef unsigned long int       BOOKMARK;
#endif  /* ODBCVER >= 0x0200 */

#endif 

#endif /* #ifndef __SQLTYPES */