ODBC source code cleanup. Mostly alignment of #define constants.

This commit is contained in:
Bruce Momjian 2001-03-27 04:00:55 +00:00
parent ff71301806
commit 12ceb11182
44 changed files with 1052 additions and 1064 deletions

View File

@ -1,4 +1,3 @@
/* Module: bind.c
*
* Description: This module contains routines related to binding

View File

@ -1,4 +1,3 @@
/* File: bind.h
*
* Description: See "bind.c"

View File

@ -1,4 +1,3 @@
/* Module: columninfo.c
*
* Description: This module contains routines related to

View File

@ -1,4 +1,3 @@
/* File: columninfo.h
*
* Description: See "columninfo.c"
@ -40,5 +39,4 @@ void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields);
void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name,
Oid new_adtid, Int2 new_adtsize, Int4 atttypmod);
#endif

View File

@ -1,4 +1,3 @@
/* Module: connection.c
*
* Description: This module contains routines related to

View File

@ -1,4 +1,3 @@
/* File: connection.h
*
* Description: See "connection.c"
@ -38,41 +37,41 @@ typedef enum
} CONN_Status;
/* These errors have general sql error state */
#define CONNECTION_SERVER_NOT_REACHED 101
#define CONNECTION_MSG_TOO_LONG 103
#define CONNECTION_COULD_NOT_SEND 104
#define CONNECTION_NO_SUCH_DATABASE 105
#define CONNECTION_BACKEND_CRAZY 106
#define CONNECTION_NO_RESPONSE 107
#define CONNECTION_SERVER_REPORTED_ERROR 108
#define CONNECTION_COULD_NOT_RECEIVE 109
#define CONNECTION_SERVER_REPORTED_WARNING 110
#define CONNECTION_NEED_PASSWORD 112
#define CONNECTION_SERVER_NOT_REACHED 101
#define CONNECTION_MSG_TOO_LONG 103
#define CONNECTION_COULD_NOT_SEND 104
#define CONNECTION_NO_SUCH_DATABASE 105
#define CONNECTION_BACKEND_CRAZY 106
#define CONNECTION_NO_RESPONSE 107
#define CONNECTION_SERVER_REPORTED_ERROR 108
#define CONNECTION_COULD_NOT_RECEIVE 109
#define CONNECTION_SERVER_REPORTED_WARNING 110
#define CONNECTION_NEED_PASSWORD 112
/* These errors correspond to specific SQL states */
#define CONN_INIREAD_ERROR 201
#define CONN_OPENDB_ERROR 202
#define CONN_STMT_ALLOC_ERROR 203
#define CONN_IN_USE 204
#define CONN_UNSUPPORTED_OPTION 205
#define CONN_INIREAD_ERROR 201
#define CONN_OPENDB_ERROR 202
#define CONN_STMT_ALLOC_ERROR 203
#define CONN_IN_USE 204
#define CONN_UNSUPPORTED_OPTION 205
/* Used by SetConnectoption to indicate unsupported options */
#define CONN_INVALID_ARGUMENT_NO 206
#define CONN_INVALID_ARGUMENT_NO 206
/* SetConnectOption: corresponds to ODBC--"S1009" */
#define CONN_TRANSACT_IN_PROGRES 207
#define CONN_NO_MEMORY_ERROR 208
#define CONN_NOT_IMPLEMENTED_ERROR 209
#define CONN_INVALID_AUTHENTICATION 210
#define CONN_AUTH_TYPE_UNSUPPORTED 211
#define CONN_UNABLE_TO_LOAD_DLL 212
#define CONN_TRANSACT_IN_PROGRES 207
#define CONN_NO_MEMORY_ERROR 208
#define CONN_NOT_IMPLEMENTED_ERROR 209
#define CONN_INVALID_AUTHENTICATION 210
#define CONN_AUTH_TYPE_UNSUPPORTED 211
#define CONN_UNABLE_TO_LOAD_DLL 212
#define CONN_OPTION_VALUE_CHANGED 213
#define CONN_VALUE_OUT_OF_RANGE 214
#define CONN_OPTION_VALUE_CHANGED 213
#define CONN_VALUE_OUT_OF_RANGE 214
#define CONN_TRUNCATED 215
#define CONN_TRUNCATED 215
/* Conn_status defines */
#define CONN_IN_AUTOCOMMIT 0x01
#define CONN_IN_TRANSACTION 0x02
#define CONN_IN_AUTOCOMMIT 0x01
#define CONN_IN_TRANSACTION 0x02
/* AutoCommit functions */
#define CC_set_autocommit_off(x) (x->transact_status &= ~CONN_IN_AUTOCOMMIT)
@ -86,31 +85,31 @@ typedef enum
/* Authentication types */
#define AUTH_REQ_OK 0
#define AUTH_REQ_KRB4 1
#define AUTH_REQ_KRB5 2
#define AUTH_REQ_PASSWORD 3
#define AUTH_REQ_CRYPT 4
#define AUTH_REQ_OK 0
#define AUTH_REQ_KRB4 1
#define AUTH_REQ_KRB5 2
#define AUTH_REQ_PASSWORD 3
#define AUTH_REQ_CRYPT 4
/* Startup Packet sizes */
#define SM_DATABASE 64
#define SM_USER 32
#define SM_OPTIONS 64
#define SM_UNUSED 64
#define SM_TTY 64
#define SM_DATABASE 64
#define SM_USER 32
#define SM_OPTIONS 64
#define SM_UNUSED 64
#define SM_TTY 64
/* Old 6.2 protocol defines */
#define NO_AUTHENTICATION 7
#define PATH_SIZE 64
#define ARGV_SIZE 64
#define NAMEDATALEN 16
#define NO_AUTHENTICATION 7
#define PATH_SIZE 64
#define ARGV_SIZE 64
#define NAMEDATALEN 16
typedef unsigned int ProtocolVersion;
#define PG_PROTOCOL(major, minor) (((major) << 16) | (minor))
#define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
#define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
#define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
#define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
#define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
#define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
/* This startup packet is to support latest Postgres protocol (6.4, 6.3) */
typedef struct _StartupPacket
@ -275,12 +274,12 @@ struct ConnectionClass_
/* Accessor functions */
#define CC_get_socket(x) (x->sock)
#define CC_get_database(x) (x->connInfo.database)
#define CC_get_server(x) (x->connInfo.server)
#define CC_get_DSN(x) (x->connInfo.dsn)
#define CC_get_username(x) (x->connInfo.username)
#define CC_is_onlyread(x) (x->connInfo.onlyread[0] == '1')
#define CC_get_socket(x) (x->sock)
#define CC_get_database(x) (x->connInfo.database)
#define CC_get_server(x) (x->connInfo.server)
#define CC_get_DSN(x) (x->connInfo.dsn)
#define CC_get_username(x) (x->connInfo.username)
#define CC_is_onlyread(x) (x->connInfo.onlyread[0] == '1')
/* for CC_DSN_info */

View File

@ -1,4 +1,3 @@
/* Module: convert.c
*
* Description: This module contains routines related to

View File

@ -1,4 +1,3 @@
/* File: convert.h
*
* Description: See "convert.c"
@ -13,12 +12,12 @@
#include "psqlodbc.h"
/* copy_and_convert results */
#define COPY_OK 0
#define COPY_UNSUPPORTED_TYPE 1
#define COPY_UNSUPPORTED_CONVERSION 2
#define COPY_RESULT_TRUNCATED 3
#define COPY_GENERAL_ERROR 4
#define COPY_NO_DATA_FOUND 5
#define COPY_OK 0
#define COPY_UNSUPPORTED_TYPE 1
#define COPY_UNSUPPORTED_CONVERSION 2
#define COPY_RESULT_TRUNCATED 3
#define COPY_GENERAL_ERROR 4
#define COPY_NO_DATA_FOUND 5
typedef struct
{

View File

@ -1,4 +1,3 @@
/* Module: dlg_specific.c
*
* Description: This module contains any specific code for handling

View File

@ -1,4 +1,3 @@
/* File: dlg_specific.h
*
* Description: See "dlg_specific.c"
@ -25,73 +24,81 @@
#endif
/* Unknown data type sizes */
#define UNKNOWNS_AS_MAX 0
#define UNKNOWNS_AS_DONTKNOW 1
#define UNKNOWNS_AS_LONGEST 2
#define UNKNOWNS_AS_MAX 0
#define UNKNOWNS_AS_DONTKNOW 1
#define UNKNOWNS_AS_LONGEST 2
/* INI File Stuff */
#ifndef WIN32
#define ODBC_INI ".odbc.ini"
#define ODBC_INI ".odbc.ini"
#ifdef ODBCINSTDIR
#define ODBCINST_INI ODBCINSTDIR "/odbcinst.ini"
#define ODBCINST_INI ODBCINSTDIR "/odbcinst.ini"
#else
#define ODBCINST_INI "/etc/odbcinst.ini"
#define ODBCINST_INI "/etc/odbcinst.ini"
#endif
#else /* WIN32 */
#define ODBC_INI "ODBC.INI" /* ODBC initialization file */
#define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */
#define ODBC_INI "ODBC.INI" /* ODBC initialization
* file */
#define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation
* file */
#endif /* WIN32 */
#define INI_DSN DBMS_NAME /* Name of default Datasource in
* ini file (not used?) */
#define INI_KDESC "Description" /* Data source description */
#define INI_SERVER "Servername" /* Name of Server running the
* Postgres service */
#define INI_PORT "Port"/* Port on which the Postmaster is
* listening */
#define INI_DATABASE "Database" /* Database Name */
#define INI_USER "Username" /* Default User Name */
#define INI_PASSWORD "Password" /* Default Password */
#define INI_DEBUG "Debug" /* Debug flag */
#define INI_FETCH "Fetch" /* Fetch Max Count */
#define INI_SOCKET "Socket" /* Socket buffer size */
#define INI_READONLY "ReadOnly" /* Database is read only */
#define INI_COMMLOG "CommLog" /* Communication to backend
* logging */
#define INI_PROTOCOL "Protocol" /* What protocol (6.2) */
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */
#define INI_KSQO "Ksqo"/* Keyset query optimization */
#define INI_CONNSETTINGS "ConnSettings" /* Anything to send to
* backend on successful
* connection */
#define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique indexes */
#define INI_UNKNOWNSIZES "UnknownSizes" /* How to handle unknown
* result set sizes */
#define INI_DSN DBMS_NAME /* Name of default
* Datasource in ini
* file (not used?) */
#define INI_KDESC "Description" /* Data source
* description */
#define INI_SERVER "Servername" /* Name of Server
* running the Postgres
* service */
#define INI_PORT "Port" /* Port on which the
* Postmaster is listening */
#define INI_DATABASE "Database" /* Database Name */
#define INI_USER "Username" /* Default User Name */
#define INI_PASSWORD "Password" /* Default Password */
#define INI_DEBUG "Debug" /* Debug flag */
#define INI_FETCH "Fetch" /* Fetch Max Count */
#define INI_SOCKET "Socket" /* Socket buffer size */
#define INI_READONLY "ReadOnly" /* Database is read only */
#define INI_COMMLOG "CommLog" /* Communication to
* backend logging */
#define INI_PROTOCOL "Protocol" /* What protocol (6.2) */
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic
* optimizer */
#define INI_KSQO "Ksqo" /* Keyset query
* optimization */
#define INI_CONNSETTINGS "ConnSettings" /* Anything to send to
* backend on successful
* connection */
#define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique
* indexes */
#define INI_UNKNOWNSIZES "UnknownSizes" /* How to handle unknown
* result set sizes */
#define INI_CANCELASFREESTMT "CancelAsFreeStmt"
#define INI_CANCELASFREESTMT "CancelAsFreeStmt"
#define INI_USEDECLAREFETCH "UseDeclareFetch" /* Use Declare/Fetch
* cursors */
#define INI_USEDECLAREFETCH "UseDeclareFetch" /* Use Declare/Fetch
* cursors */
/* More ini stuff */
#define INI_TEXTASLONGVARCHAR "TextAsLongVarchar"
#define INI_UNKNOWNSASLONGVARCHAR "UnknownsAsLongVarchar"
#define INI_BOOLSASCHAR "BoolsAsChar"
#define INI_MAXVARCHARSIZE "MaxVarcharSize"
#define INI_MAXLONGVARCHARSIZE "MaxLongVarcharSize"
#define INI_TEXTASLONGVARCHAR "TextAsLongVarchar"
#define INI_UNKNOWNSASLONGVARCHAR "UnknownsAsLongVarchar"
#define INI_BOOLSASCHAR "BoolsAsChar"
#define INI_MAXVARCHARSIZE "MaxVarcharSize"
#define INI_MAXLONGVARCHARSIZE "MaxLongVarcharSize"
#define INI_FAKEOIDINDEX "FakeOidIndex"
#define INI_SHOWOIDCOLUMN "ShowOidColumn"
#define INI_ROWVERSIONING "RowVersioning"
#define INI_SHOWSYSTEMTABLES "ShowSystemTables"
#define INI_LIE "Lie"
#define INI_PARSE "Parse"
#define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes"
#define INI_FAKEOIDINDEX "FakeOidIndex"
#define INI_SHOWOIDCOLUMN "ShowOidColumn"
#define INI_ROWVERSIONING "RowVersioning"
#define INI_SHOWSYSTEMTABLES "ShowSystemTables"
#define INI_LIE "Lie"
#define INI_PARSE "Parse"
#define INI_EXTRASYSTABLEPREFIXES "ExtraSysTablePrefixes"
#define INI_TRANSLATIONNAME "TranslationName"
#define INI_TRANSLATIONDLL "TranslationDLL"
#define INI_TRANSLATIONOPTION "TranslationOption"
#define INI_TRANSLATIONNAME "TranslationName"
#define INI_TRANSLATIONDLL "TranslationDLL"
#define INI_TRANSLATIONOPTION "TranslationOption"
/* Connection Defaults */

View File

@ -1,4 +1,3 @@
/* Module: drvconn.c
*
* Description: This module contains only routines related to

View File

@ -1,4 +1,3 @@
/* Module: environ.c
*
* Description: This module contains routines related to

View File

@ -1,4 +1,3 @@
/* File: environ.h
*
* Description: See "environ.c"

View File

@ -1,4 +1,3 @@
/* Module: execute.c
*
* Description: This module contains routines related to

View File

@ -1,14 +1,21 @@
/* GetPrivateProfileString() -- approximate implementation of */
/* Windows NT System Services version of GetPrivateProfileString() */
/* probably doesn't handle the NULL key for section name or value key */
/* correctly also, doesn't provide Microsoft backwards compatability */
/* wrt TAB characters in the value string -- Microsoft terminates value */
/* at the first TAB, but I couldn't discover what the behavior should */
/* be regarding TABS in quoted strings so, I treat tabs like any other */
/* characters -- NO comments following value string separated by a TAB */
/* are allowed (that is an anachronism anyway) */
/* Added code to search for ODBC_INI file in users home directory on */
/* Unix */
/* GetPrivateProfileString()
*
* approximate implementation of
* Windows NT System Services version of GetPrivateProfileString()
* probably doesn't handle the NULL key for section name or value key
* correctly also, doesn't provide Microsoft backwards compatability
* wrt TAB characters in the value string
*
* Microsoft terminates value
* at the first TAB, but I couldn't discover what the behavior should
* be regarding TABS in quoted strings so, I treat tabs like any other
* characters
*
* NO comments following value string separated by a TAB
* are allowed (that is an anachronism anyway)
* Added code to search for ODBC_INI file in users home directory on
* Unix
*/
#ifndef WIN32

View File

@ -1,5 +1,6 @@
/* GetPrivateProfileString */
/* for UNIX use */
/* GetPrivateProfileString
* for UNIX use
*/
#ifndef GPPS_H
#define GPPS_H

View File

@ -1,4 +1,3 @@
/* Module: info.c
*
* Description: This module contains routines related to

View File

@ -7,15 +7,15 @@
#include <stdlib.h>
#include <sys/types.h>
#define MEM_ALLOC(size) (malloc((size_t)(size)))
#define MEM_FREE(ptr) {if(ptr) free(ptr);}
#define MEM_ALLOC(size) (malloc((size_t)(size)))
#define MEM_FREE(ptr) {if(ptr) free(ptr);}
#define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
#define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
#define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
#define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
#define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0)
#define STRLEN(str) ((str)? strlen((char*)(str)):0)
#define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
#define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
#define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
#define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
#define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0)
#define STRLEN(str) ((str)? strlen((char*)(str)):0)
#define EXPORT
#define CALLBACK
@ -38,29 +38,29 @@ typedef int BOOL;
#include <windowsx.h>
#ifdef _MSVC_
#define MEM_ALLOC(size) (fmalloc((size_t)(size)))
#define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0))
#define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s)))
#define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
#define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#define MEM_ALLOC(size) (fmalloc((size_t)(size)))
#define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0))
#define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s)))
#define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
#define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#endif
#ifdef _BORLAND_
#define MEM_ALLOC(size) (farmalloc((unsigned long)(size))
#define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
#define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
#define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
#define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#define MEM_ALLOC(size) (farmalloc((unsigned long)(size))
#define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
#define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
#define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
#define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#endif
#endif /* WIN32 */
#define SYSERR (-1)
#define SYSERR (-1)
#ifndef NULL
#define NULL ((void FAR*)0UL)
#define NULL ((void FAR*)0UL)
#endif
#endif

View File

@ -1,6 +1,8 @@
/* Modified isql.h file from iodbc. This file should be placed in the
* include path to be used to create ODBC compliant applications.
*/
/*
* Modified isql.h file from iodbc. This file should be placed in the
* include path to be used to create ODBC compliant applications.
*/
#ifndef _INTRINSIC_SQL_H
#define _INTRINSIC_SQL_H
@ -24,106 +26,106 @@ typedef signed short RETCODE;
#define SQL_API EXPORT CALLBACK
#endif
#define ODBCVER 0x0250
#define ODBCVER 0x0250
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
/* return code */
#define SQL_INVALID_HANDLE (-2)
#define SQL_ERROR (-1)
#define SQL_SUCCESS 0
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_NO_DATA_FOUND 100
#define SQL_INVALID_HANDLE (-2)
#define SQL_ERROR (-1)
#define SQL_SUCCESS 0
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_NO_DATA_FOUND 100
/* standard SQL datatypes (agree with ANSI type numbering) */
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_VARCHAR 12
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_VARCHAR 12
#define SQL_TYPE_MIN SQL_CHAR
#define SQL_TYPE_NULL 0
#define SQL_TYPE_MAX SQL_VARCHAR
#define SQL_TYPE_MIN SQL_CHAR
#define SQL_TYPE_NULL 0
#define SQL_TYPE_MAX SQL_VARCHAR
/* C to SQL datatype mapping */
#define SQL_C_CHAR SQL_CHAR
#define SQL_C_LONG SQL_INTEGER
#define SQL_C_SHORT SQL_SMALLINT
#define SQL_C_FLOAT SQL_REAL
#define SQL_C_DOUBLE SQL_DOUBLE
#define SQL_C_DEFAULT 99
#define SQL_C_CHAR SQL_CHAR
#define SQL_C_LONG SQL_INTEGER
#define SQL_C_SHORT SQL_SMALLINT
#define SQL_C_FLOAT SQL_REAL
#define SQL_C_DOUBLE SQL_DOUBLE
#define SQL_C_DEFAULT 99
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE_UNKNOWN 2
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE_UNKNOWN 2
/* some special length values */
#define SQL_NULL_DATA (-1)
#define SQL_DATA_AT_EXEC (-2)
#define SQL_NTS (-3)
#define SQL_NULL_DATA (-1)
#define SQL_DATA_AT_EXEC (-2)
#define SQL_NTS (-3)
/* SQLFreeStmt flag values */
#define SQL_CLOSE 0
#define SQL_DROP 1
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS 3
#define SQL_CLOSE 0
#define SQL_DROP 1
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS 3
/* SQLTransact flag values */
#define SQL_COMMIT 0
#define SQL_ROLLBACK 1
#define SQL_COMMIT 0
#define SQL_ROLLBACK 1
/* SQLColAttributes flag values */
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLUMN_DRIVER_START 1000
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLUMN_DRIVER_START 1000
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
/* Null handles */
#define SQL_NULL_HENV 0
#define SQL_NULL_HDBC 0
#define SQL_NULL_HSTMT 0
#define SQL_NULL_HENV 0
#define SQL_NULL_HDBC 0
#define SQL_NULL_HSTMT 0
/* All code below has been added to the original isql.h coming from iodbc */
typedef unsigned char BYTE;
/* More SQLColAttributes flag values */
#define SQL_COLUMN_NAME 1
#define SQL_COLUMN_TYPE 2
#define SQL_COLUMN_LENGTH 3
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_SCALE 5
#define SQL_COLUMN_DISPLAY_SIZE 6
#define SQL_COLUMN_NULLABLE 7
#define SQL_COLUMN_UNSIGNED 8
#define SQL_COLUMN_MONEY 9
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_SEARCHABLE 13
#define SQL_COLUMN_TYPE_NAME 14
#define SQL_COLUMN_TABLE_NAME 15
#define SQL_COLUMN_OWNER_NAME 16
#define SQL_COLUMN_QUALIFIER_NAME 17
#define SQL_COLUMN_NAME 1
#define SQL_COLUMN_TYPE 2
#define SQL_COLUMN_LENGTH 3
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_SCALE 5
#define SQL_COLUMN_DISPLAY_SIZE 6
#define SQL_COLUMN_NULLABLE 7
#define SQL_COLUMN_UNSIGNED 8
#define SQL_COLUMN_MONEY 9
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_SEARCHABLE 13
#define SQL_COLUMN_TYPE_NAME 14
#define SQL_COLUMN_TABLE_NAME 15
#define SQL_COLUMN_OWNER_NAME 16
#define SQL_COLUMN_QUALIFIER_NAME 17
/* SQLColAttributes Searchable flags */
#define SQL_UNSEARCHABLE 0
#define SQL_LIKE_ONLY 1
#define SQL_ALL_EXCEPT_LIKE 2
#define SQL_SEARCHABLE 3
#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
#define SQL_UNSEARCHABLE 0
#define SQL_LIKE_ONLY 1
#define SQL_ALL_EXCEPT_LIKE 2
#define SQL_SEARCHABLE 3
#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
/* SQLColAttributes Updateable flags */
#define SQL_ATTR_READONLY 0
#define SQL_ATTR_WRITE 1
#define SQL_ATTR_READWRITE_UNKNOWN 2
#define SQL_ATTR_READONLY 0
#define SQL_ATTR_WRITE 1
#define SQL_ATTR_READWRITE_UNKNOWN 2
/*
* function prototypes previously not contained in isql.h

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
/* Module: lobj.c
*
* Description: This module contains routines related to manipulating

View File

@ -1,4 +1,3 @@
/* File: lobj.h
*
* Description: See "lobj.c"
@ -24,17 +23,17 @@ struct lo_arg
} u;
};
#define LO_CREAT 957
#define LO_OPEN 952
#define LO_CLOSE 953
#define LO_READ 954
#define LO_WRITE 955
#define LO_LSEEK 956
#define LO_TELL 958
#define LO_UNLINK 964
#define LO_CREAT 957
#define LO_OPEN 952
#define LO_CLOSE 953
#define LO_READ 954
#define LO_WRITE 955
#define LO_LSEEK 956
#define LO_TELL 958
#define LO_UNLINK 964
#define INV_WRITE 0x00020000
#define INV_READ 0x00040000
#define INV_WRITE 0x00020000
#define INV_READ 0x00040000
Oid lo_creat(ConnectionClass *conn, int mode);
int lo_open(ConnectionClass *conn, int lobjId, int mode);

View File

@ -1,4 +1,3 @@
/* Module: misc.c
*
* Description: This module contains miscellaneous routines

View File

@ -1,4 +1,3 @@
/* File: misc.h
*
* Description: See "misc.c"
@ -39,11 +38,11 @@
#ifdef MY_LOG
#define MYLOGFILE "mylog_"
#define MYLOGFILE "mylog_"
#ifndef WIN32
#define MYLOGDIR "/tmp"
#define MYLOGDIR "/tmp"
#else
#define MYLOGDIR "c:"
#define MYLOGDIR "c:"
#endif
extern void mylog(char *fmt,...);
@ -56,11 +55,11 @@ extern void mylog(char *fmt,...);
#endif
#ifdef Q_LOG
#define QLOGFILE "psqlodbc_"
#define QLOGFILE "psqlodbc_"
#ifndef WIN32
#define QLOGDIR "/tmp"
#define QLOGDIR "/tmp"
#else
#define QLOGDIR "c:"
#define QLOGDIR "c:"
#endif
extern void qlog(char *fmt,...);
@ -73,19 +72,19 @@ extern void qlog(char *fmt,...);
#endif
#ifndef WIN32
#define DIRSEPARATOR "/"
#define DIRSEPARATOR "/"
#else
#define DIRSEPARATOR "\\"
#define DIRSEPARATOR "\\"
#endif
#ifdef WIN32
#define PG_BINARY O_BINARY
#define PG_BINARY_R "rb"
#define PG_BINARY_W "wb"
#define PG_BINARY O_BINARY
#define PG_BINARY_R "rb"
#define PG_BINARY_W "wb"
#else
#define PG_BINARY 0
#define PG_BINARY_R "r"
#define PG_BINARY_W "w"
#define PG_BINARY 0
#define PG_BINARY_R "r"
#define PG_BINARY_W "w"
#endif
@ -98,8 +97,8 @@ char *my_strcat(char *buf, char *fmt, char *s, int len);
/* defines for return value of my_strcpy */
#define STRCPY_SUCCESS 1
#define STRCPY_FAIL 0
#define STRCPY_TRUNCATED -1
#define STRCPY_NULL -2
#define STRCPY_TRUNCATED (-1)
#define STRCPY_NULL (-2)
int my_strcpy(char *dst, int dst_len, char *src, int src_len);

View File

@ -6,6 +6,7 @@
* Create 2001-03-03 Eiji Tokuya
*
*/
#include <string.h>
#include "multibyte.h"

View File

@ -2,32 +2,31 @@
*
* Multibyte library header ( psqlODBC Only )
*
*
*/
/* PostgreSQL client encoding */
#define SQL_ASCII 0 /* SQL/ASCII */
#define EUC_JP 1 /* EUC for Japanese */
#define EUC_CN 2 /* EUC for Chinese */
#define EUC_KR 3 /* EUC for Korean */
#define EUC_TW 4 /* EUC for Taiwan */
#define UNICODE 5 /* Unicode UTF-8 */
#define MULE_INTERNAL 6 /* Mule internal code */
#define LATIN1 7 /* ISO-8859 Latin 1 */
#define LATIN2 8 /* ISO-8859 Latin 2 */
#define LATIN3 9 /* ISO-8859 Latin 3 */
#define LATIN4 10 /* ISO-8859 Latin 4 */
#define LATIN5 11 /* ISO-8859 Latin 5 */
#define LATIN6 12 /* ISO-8859 Latin 6 */
#define LATIN7 13 /* ISO-8859 Latin 7 */
#define LATIN8 14 /* ISO-8859 Latin 8 */
#define LATIN9 15 /* ISO-8859 Latin 9 */
#define KOI8 16 /* KOI8-R */
#define WIN 17 /* windows-1251 */
#define ALT 18 /* Alternativny Variant (MS-DOS CP866) */
#define SJIS 32 /* Shift JIS */
#define BIG5 33 /* Big5 */
#define WIN1250 34 /* windows-1250 */
#define SQL_ASCII 0 /* SQL/ASCII */
#define EUC_JP 1 /* EUC for Japanese */
#define EUC_CN 2 /* EUC for Chinese */
#define EUC_KR 3 /* EUC for Korean */
#define EUC_TW 4 /* EUC for Taiwan */
#define UNICODE 5 /* Unicode UTF-8 */
#define MULE_INTERNAL 6 /* Mule internal code */
#define LATIN1 7 /* ISO-8859 Latin 1 */
#define LATIN2 8 /* ISO-8859 Latin 2 */
#define LATIN3 9 /* ISO-8859 Latin 3 */
#define LATIN4 10 /* ISO-8859 Latin 4 */
#define LATIN5 11 /* ISO-8859 Latin 5 */
#define LATIN6 12 /* ISO-8859 Latin 6 */
#define LATIN7 13 /* ISO-8859 Latin 7 */
#define LATIN8 14 /* ISO-8859 Latin 8 */
#define LATIN9 15 /* ISO-8859 Latin 9 */
#define KOI8 16 /* KOI8-R */
#define WIN 17 /* windows-1251 */
#define ALT 18 /* Alternativny Variant (MS-DOS CP866) */
#define SJIS 32 /* Shift JIS */
#define BIG5 33 /* Big5 */
#define WIN1250 34 /* windows-1250 */
extern int multibyte_client_encoding; /* Multibyte client encoding. */

View File

@ -1,4 +1,3 @@
/* Module: options.c
*
* Description: This module contains routines for getting/setting

View File

@ -1,4 +1,3 @@
/* Module: parse.c
*
* Description: This module contains routines related to parsing SQL statements.

View File

@ -1,4 +1,3 @@
/* Module: pgtypes.c
*
* Description: This module contains routines for getting information

View File

@ -1,4 +1,3 @@
/* File: pgtypes.h
*
* Description: See "pgtypes.c"
@ -17,57 +16,57 @@
#if 0
#define PG_TYPE_LO ????/* waiting for permanent type */
#define PG_TYPE_LO ???? /* waiting for permanent type */
#endif
#define PG_TYPE_BOOL 16
#define PG_TYPE_BYTEA 17
#define PG_TYPE_CHAR 18
#define PG_TYPE_NAME 19
#define PG_TYPE_INT8 20
#define PG_TYPE_INT2 21
#define PG_TYPE_INT2VECTOR 22
#define PG_TYPE_INT4 23
#define PG_TYPE_REGPROC 24
#define PG_TYPE_TEXT 25
#define PG_TYPE_OID 26
#define PG_TYPE_TID 27
#define PG_TYPE_XID 28
#define PG_TYPE_CID 29
#define PG_TYPE_OIDVECTOR 30
#define PG_TYPE_SET 32
#define PG_TYPE_CHAR2 409
#define PG_TYPE_CHAR4 410
#define PG_TYPE_CHAR8 411
#define PG_TYPE_POINT 600
#define PG_TYPE_LSEG 601
#define PG_TYPE_PATH 602
#define PG_TYPE_BOX 603
#define PG_TYPE_POLYGON 604
#define PG_TYPE_FILENAME 605
#define PG_TYPE_FLOAT4 700
#define PG_TYPE_FLOAT8 701
#define PG_TYPE_ABSTIME 702
#define PG_TYPE_RELTIME 703
#define PG_TYPE_TINTERVAL 704
#define PG_TYPE_UNKNOWN 705
#define PG_TYPE_MONEY 790
#define PG_TYPE_OIDINT2 810
#define PG_TYPE_OIDINT4 910
#define PG_TYPE_OIDNAME 911
#define PG_TYPE_BPCHAR 1042
#define PG_TYPE_VARCHAR 1043
#define PG_TYPE_DATE 1082
#define PG_TYPE_TIME 1083
#define PG_TYPE_DATETIME 1184
#define PG_TYPE_TIMESTAMP 1296
#define PG_TYPE_NUMERIC 1700
#define PG_TYPE_BOOL 16
#define PG_TYPE_BYTEA 17
#define PG_TYPE_CHAR 18
#define PG_TYPE_NAME 19
#define PG_TYPE_INT8 20
#define PG_TYPE_INT2 21
#define PG_TYPE_INT2VECTOR 22
#define PG_TYPE_INT4 23
#define PG_TYPE_REGPROC 24
#define PG_TYPE_TEXT 25
#define PG_TYPE_OID 26
#define PG_TYPE_TID 27
#define PG_TYPE_XID 28
#define PG_TYPE_CID 29
#define PG_TYPE_OIDVECTOR 30
#define PG_TYPE_SET 32
#define PG_TYPE_CHAR2 409
#define PG_TYPE_CHAR4 410
#define PG_TYPE_CHAR8 411
#define PG_TYPE_POINT 600
#define PG_TYPE_LSEG 601
#define PG_TYPE_PATH 602
#define PG_TYPE_BOX 603
#define PG_TYPE_POLYGON 604
#define PG_TYPE_FILENAME 605
#define PG_TYPE_FLOAT4 700
#define PG_TYPE_FLOAT8 701
#define PG_TYPE_ABSTIME 702
#define PG_TYPE_RELTIME 703
#define PG_TYPE_TINTERVAL 704
#define PG_TYPE_UNKNOWN 705
#define PG_TYPE_MONEY 790
#define PG_TYPE_OIDINT2 810
#define PG_TYPE_OIDINT4 910
#define PG_TYPE_OIDNAME 911
#define PG_TYPE_BPCHAR 1042
#define PG_TYPE_VARCHAR 1043
#define PG_TYPE_DATE 1082
#define PG_TYPE_TIME 1083
#define PG_TYPE_DATETIME 1184
#define PG_TYPE_TIMESTAMP 1296
#define PG_TYPE_NUMERIC 1700
/* extern Int4 pgtypes_defined[]; */
extern Int2 sqlTypes[];
/* Defines for pgtype_precision */
#define PG_STATIC -1
#define PG_STATIC (-1)
Int4 sqltype_to_pgtype(Int2 fSqlType);

View File

@ -1,4 +1,3 @@
/* Module: psqlodbc.c
*
* Description: This module contains the main entry point (DllMain) for the library.

View File

@ -1,4 +1,3 @@
/* File: psqlodbc.h
*
* Description: This file contains defines and declarations that are related to
@ -6,7 +5,8 @@
*
* Comments: See "notice.txt" for copyright and license information.
*
* $Id: psqlodbc.h,v 1.40 2001/03/22 04:01:35 momjian Exp $
* $Id: psqlodbc.h,v 1.41 2001/03/27 04:00:54 momjian Exp $
*
*/
#ifndef __PSQLODBC_H__
@ -36,18 +36,18 @@ typedef double SDOUBLE;
typedef UInt4 Oid;
/* Driver stuff */
#define ODBCVER 0x0250
#define DRIVER_ODBC_VER "02.50"
#define ODBCVER 0x0250
#define DRIVER_ODBC_VER "02.50"
#define DRIVERNAME "PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL"
#define DRIVERNAME "PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL"
#define POSTGRESDRIVERVERSION "07.01.0004"
#define POSTGRESDRIVERVERSION "07.01.0004"
#ifdef WIN32
#define DRIVER_FILE_NAME "PSQLODBC.DLL"
#define DRIVER_FILE_NAME "PSQLODBC.DLL"
#else
#define DRIVER_FILE_NAME "libpsqlodbc.so"
#define DRIVER_FILE_NAME "libpsqlodbc.so"
#endif
/* Limits */
@ -83,27 +83,28 @@ typedef UInt4 Oid;
/* These prefixes denote system tables */
#define POSTGRES_SYS_PREFIX "pg_"
#define KEYS_TABLE "dd_fkey"
#define POSTGRES_SYS_PREFIX "pg_"
#define KEYS_TABLE "dd_fkey"
/* Info limits */
#define MAX_INFO_STRING 128
#define MAX_KEYPARTS 20
#define MAX_KEYLEN 512 /* max key of the form
* "date+outlet+invoice" */
#define MAX_ROW_SIZE 0 /* Unlimited rowsize with the Tuple
* Toaster */
#define MAX_STATEMENT_LEN 0 /* Unlimited statement size with 7.0 */
#define MAX_INFO_STRING 128
#define MAX_KEYPARTS 20
#define MAX_KEYLEN 512 /* max key of the form
* "date+outlet+invoice" */
#define MAX_ROW_SIZE 0 /* Unlimited rowsize with the
* Tuple Toaster */
#define MAX_STATEMENT_LEN 0 /* Unlimited statement size with
* 7.0 */
/* Previously, numerous query strings were defined of length MAX_STATEMENT_LEN */
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
#define PG62 "6.2" /* "Protocol" key setting to force
* Postgres 6.2 */
#define PG63 "6.3" /* "Protocol" key setting to force
* postgres 6.3 */
#define PG64 "6.4"
#define PG62 "6.2" /* "Protocol" key setting
* to force Postgres 6.2 */
#define PG63 "6.3" /* "Protocol" key setting
* to force postgres 6.3 */
#define PG64 "6.4"
typedef struct ConnectionClass_ ConnectionClass;
typedef struct StatementClass_ StatementClass;
@ -173,17 +174,18 @@ typedef struct QueryInfo_
} QueryInfo;
#define PG_TYPE_LO -999 /* hack until permanent type
* available */
#define PG_TYPE_LO_NAME "lo"
#define OID_ATTNUM -2 /* the attnum in pg_index of the
* oid */
#define PG_TYPE_LO (-999) /* hack until permanent
* type available */
#define PG_TYPE_LO_NAME "lo"
#define OID_ATTNUM (-2) /* the attnum in pg_index
* of the oid */
/* sizes */
#define TEXT_FIELD_SIZE 8190 /* size of text fields (not
* including null term) */
#define NAME_FIELD_SIZE 32 /* size of name fields */
#define MAX_VARCHAR_SIZE 254 /* maximum size of a varchar (not
#define TEXT_FIELD_SIZE 8190 /* size of text fields
* (not including null
* term) */
#define NAME_FIELD_SIZE 32 /* size of name fields */
#define MAX_VARCHAR_SIZE 254 /* maximum size of a varchar (not
* including null term) */
#define PG_NUMERIC_MAX_PRECISION 1000

View File

@ -1,4 +1,3 @@
/* Module: qresult.c
*
* Description: This module contains functions related to

View File

@ -1,4 +1,3 @@
/* File: qresult.h
*
* Description: See "qresult.c"
@ -72,7 +71,7 @@ struct QResultClass_
char aborted; /* was aborted? */
};
#define QR_get_fields(self) (self->fields)
#define QR_get_fields(self) (self->fields)
/* These functions are for retrieving data from the qresult */
@ -94,20 +93,20 @@ struct QResultClass_
#define QR_set_field_info(self, field_num, name, adtid, adtsize) (CI_set_field_info(self->fields, field_num, name, adtid, adtsize, -1))
/* status macros */
#define QR_command_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR))
#define QR_command_nonfatal(self) ( self->status == PGRES_NONFATAL_ERROR)
#define QR_end_tuples(self) ( self->status == PGRES_END_TUPLES)
#define QR_set_status(self, condition) ( self->status = condition )
#define QR_set_message(self, message_) ( self->message = message_)
#define QR_set_aborted(self, aborted_) ( self->aborted = aborted_)
#define QR_command_successful(self) ( !(self->status == PGRES_BAD_RESPONSE || self->status == PGRES_NONFATAL_ERROR || self->status == PGRES_FATAL_ERROR))
#define QR_command_nonfatal(self) ( self->status == PGRES_NONFATAL_ERROR)
#define QR_end_tuples(self) ( self->status == PGRES_END_TUPLES)
#define QR_set_status(self, condition) ( self->status = condition )
#define QR_set_message(self, message_) ( self->message = message_)
#define QR_set_aborted(self, aborted_) ( self->aborted = aborted_)
#define QR_get_message(self) (self->message)
#define QR_get_command(self) (self->command)
#define QR_get_notice(self) (self->notice)
#define QR_get_status(self) (self->status)
#define QR_get_message(self) (self->message)
#define QR_get_command(self) (self->command)
#define QR_get_notice(self) (self->notice)
#define QR_get_status(self) (self->status)
#define QR_get_aborted(self) (self->aborted)
#define QR_aborted(self) (!self || self->aborted)
#define QR_aborted(self) (!self || self->aborted)
/* Core Functions */
QResultClass *QR_Constructor(void);

View File

@ -1,4 +1,3 @@
/* Module: results.c
*
* Description: This module contains functions related to

View File

@ -1,4 +1,3 @@
/* Module: setup.c
*
* Description: This module contains the setup functions for
@ -11,7 +10,7 @@
*
* Comments: See "notice.txt" for copyright and license information.
*
*************************************************************************************/
*/
#include "psqlodbc.h"
#include "connection.h"

View File

@ -1,4 +1,3 @@
/* Module: socket.c
*
* Description: This module contains functions for low level socket

View File

@ -1,4 +1,3 @@
/* File: socket.h
*
* Description: See "socket.c"
@ -41,16 +40,16 @@ typedef unsigned int in_addr_t;
#include "psqlodbc.h"
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_HOST_NOT_FOUND 2
#define SOCKET_COULD_NOT_CREATE_SOCKET 3
#define SOCKET_COULD_NOT_CONNECT 4
#define SOCKET_READ_ERROR 5
#define SOCKET_WRITE_ERROR 6
#define SOCKET_NULLPOINTER_PARAMETER 7
#define SOCKET_PUT_INT_WRONG_LENGTH 8
#define SOCKET_GET_INT_WRONG_LENGTH 9
#define SOCKET_CLOSED 10
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_HOST_NOT_FOUND 2
#define SOCKET_COULD_NOT_CREATE_SOCKET 3
#define SOCKET_COULD_NOT_CONNECT 4
#define SOCKET_READ_ERROR 5
#define SOCKET_WRITE_ERROR 6
#define SOCKET_NULLPOINTER_PARAMETER 7
#define SOCKET_PUT_INT_WRONG_LENGTH 8
#define SOCKET_GET_INT_WRONG_LENGTH 9
#define SOCKET_CLOSED 10
struct SocketClass_

View File

@ -1,4 +1,3 @@
/* Module: statement.c
*
* Description: This module contains functions related to creating

View File

@ -1,4 +1,3 @@
/* File: statement.h
*
* Description: See "statement.c"
@ -50,38 +49,40 @@ typedef enum
STMT_EXECUTING /* statement execution is still going on */
} STMT_Status;
#define STMT_TRUNCATED -2
#define STMT_INFO_ONLY -1 /* not an error message, just a
* notification to be returned by SQLError */
#define STMT_OK 0 /* will be interpreted as "no error
* pending" */
#define STMT_EXEC_ERROR 1
#define STMT_STATUS_ERROR 2
#define STMT_SEQUENCE_ERROR 3
#define STMT_NO_MEMORY_ERROR 4
#define STMT_COLNUM_ERROR 5
#define STMT_NO_STMTSTRING 6
#define STMT_ERROR_TAKEN_FROM_BACKEND 7
#define STMT_INTERNAL_ERROR 8
#define STMT_STILL_EXECUTING 9
#define STMT_NOT_IMPLEMENTED_ERROR 10
#define STMT_BAD_PARAMETER_NUMBER_ERROR 11
#define STMT_OPTION_OUT_OF_RANGE_ERROR 12
#define STMT_INVALID_COLUMN_NUMBER_ERROR 13
#define STMT_RESTRICTED_DATA_TYPE_ERROR 14
#define STMT_INVALID_CURSOR_STATE_ERROR 15
#define STMT_OPTION_VALUE_CHANGED 16
#define STMT_CREATE_TABLE_ERROR 17
#define STMT_NO_CURSOR_NAME 18
#define STMT_INVALID_CURSOR_NAME 19
#define STMT_INVALID_ARGUMENT_NO 20
#define STMT_ROW_OUT_OF_RANGE 21
#define STMT_OPERATION_CANCELLED 22
#define STMT_INVALID_CURSOR_POSITION 23
#define STMT_VALUE_OUT_OF_RANGE 24
#define STMT_OPERATION_INVALID 25
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26
#define STMT_BAD_ERROR 27
#define STMT_TRUNCATED (-2)
#define STMT_INFO_ONLY (-1) /* not an error message,
* just a notification
* to be returned by
* SQLError */
#define STMT_OK 0 /* will be interpreted
* as "no error pending" */
#define STMT_EXEC_ERROR 1
#define STMT_STATUS_ERROR 2
#define STMT_SEQUENCE_ERROR 3
#define STMT_NO_MEMORY_ERROR 4
#define STMT_COLNUM_ERROR 5
#define STMT_NO_STMTSTRING 6
#define STMT_ERROR_TAKEN_FROM_BACKEND 7
#define STMT_INTERNAL_ERROR 8
#define STMT_STILL_EXECUTING 9
#define STMT_NOT_IMPLEMENTED_ERROR 10
#define STMT_BAD_PARAMETER_NUMBER_ERROR 11
#define STMT_OPTION_OUT_OF_RANGE_ERROR 12
#define STMT_INVALID_COLUMN_NUMBER_ERROR 13
#define STMT_RESTRICTED_DATA_TYPE_ERROR 14
#define STMT_INVALID_CURSOR_STATE_ERROR 15
#define STMT_OPTION_VALUE_CHANGED 16
#define STMT_CREATE_TABLE_ERROR 17
#define STMT_NO_CURSOR_NAME 18
#define STMT_INVALID_CURSOR_NAME 19
#define STMT_INVALID_ARGUMENT_NO 20
#define STMT_ROW_OUT_OF_RANGE 21
#define STMT_OPERATION_CANCELLED 22
#define STMT_INVALID_CURSOR_POSITION 23
#define STMT_VALUE_OUT_OF_RANGE 24
#define STMT_OPERATION_INVALID 25
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26
#define STMT_BAD_ERROR 27
/* statement types */
enum

View File

@ -1,4 +1,3 @@
/* Module: tuple.c
*
* Description: This module contains functions for setting the data for individual

View File

@ -1,4 +1,3 @@
/* File: tuple.h
*
* Description: See "tuple.c"

View File

@ -1,4 +1,3 @@
/* Module: tuplelist.c
*
* Description: This module contains functions for creating a manual result set

View File

@ -1,4 +1,3 @@
/* File: tuplelist.h
*
* Description: See "tuplelist.c"