File: stripsql.h

package info (click to toggle)
cricket 1.0.5-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,480 kB
  • ctags: 390
  • sloc: perl: 8,287; sh: 920; ansic: 318; makefile: 62; sql: 16
file content (96 lines) | stat: -rwxr-xr-x 3,189 bytes parent folder | download | duplicates (8)
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

#ifdef __cplusplus
extern "C" { 			/* Assume C declarations for C++   */
#endif  /* __cplusplus */

/* ODBC function return values */
#define SQL_SUCCESS                0
#define SQL_SUCCESS_WITH_INFO      1
#define SQL_NO_DATA              100
#define SQL_ERROR                 (-1)
#define SQL_INVALID_HANDLE        (-2)
#define SQL_NO_DATA_FOUND	 100

/* null-terminated string code */
#define SQL_NTS                   (-3)

/* handle type identifiers */
#define SQL_HANDLE_ENV             1
#define SQL_HANDLE_DBC             2
#define SQL_HANDLE_STMT            3
#define SQL_HANDLE_DESC            4

/* null handles returned by SQLAllocHandle() */
#define SQL_NULL_HENV       0
#define SQL_NULL_HDBC       0
#define SQL_NULL_HSTMT      0
#define SQL_NULL_HDESC      0
#define SQL_NULL_HANDLE     0L

/* typedefs & defines not exported via Perl */
typedef unsigned char   SQLCHAR;
typedef long            SQLINTEGER;
typedef short           SQLSMALLINT;
typedef unsigned short  SQLUSMALLINT;
typedef void *		SQLPOINTER;
typedef SQLSMALLINT     SQLRETURN;
typedef void*		SQLHANDLE;
typedef SQLHANDLE	SQLHSTMT;
typedef SQLHANDLE	SQLHDBC;
#define SQL_C_CHAR    		1
#define SQL_ATTR_ODBC_VERSION	200
#define	SQL_OV_ODBC3		3UL
#define SQL_DRIVER_NOPROMPT     0
#define SQL_NULL_DATA          (-1)
#define SQL_API		__stdcall

SQLRETURN SQL_API    SQLAllocHandle(SQLSMALLINT HandleType,
           SQLHANDLE InputHandle, SQLHANDLE *OutputHandle);

SQLRETURN SQL_API    SQLCloseCursor(SQLHSTMT StatementHandle);

SQLRETURN SQL_API    SQLConnect(SQLHDBC ConnectionHandle,
           SQLCHAR *ServerName, SQLSMALLINT NameLength1,
           SQLCHAR *UserName, SQLSMALLINT NameLength2,
           SQLCHAR *Authentication, SQLSMALLINT NameLength3);

SQLRETURN SQL_API    SQLDisconnect(SQLHDBC ConnectionHandle);

SQLRETURN SQL_API    SQLDriverConnect(
    SQLHDBC            hdbc,
    SQLHANDLE          hwnd,
    SQLCHAR 	       *szConnStrIn,
    SQLSMALLINT        cbConnStrIn,
    SQLCHAR            *szConnStrOut,
    SQLSMALLINT        cbConnStrOutMax,
    SQLSMALLINT        *pcbConnStrOut,
    SQLUSMALLINT       fDriverCompletion);

SQLRETURN SQL_API    SQLExecDirect(SQLHSTMT StatementHandle,
           SQLCHAR *StatementText, SQLINTEGER TextLength);

SQLRETURN SQL_API    SQLFetch(SQLHSTMT StatementHandle);

SQLRETURN SQL_API    SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle);

SQLRETURN SQL_API    SQLGetData(SQLHSTMT StatementHandle,
           SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
           SQLPOINTER TargetValue, SQLINTEGER BufferLength,
           SQLINTEGER *StrLen_or_Ind);

SQLRETURN SQL_API    SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
           SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
           SQLINTEGER *NativeError, SQLCHAR *MessageText,
           SQLSMALLINT BufferLength, SQLSMALLINT *TextLength);

SQLRETURN SQL_API    SQLNumResultCols(SQLHSTMT StatementHandle,
           SQLSMALLINT *ColumnCount);

SQLRETURN SQL_API    SQLSetEnvAttr(SQLHANDLE EnvironmentHandle,
	   SQLINTEGER Attribute,
	   SQLPOINTER ValuePtr,
	   SQLINTEGER StringLength);

#ifdef __cplusplus
} /* End of extern "C" { */
#endif  /* __cplusplus */