//****************************************************************** // // AUTHOR : ZhaoTiger // // FUNCTION : 数据库模块需要用到的所有常量定义 // // TIME : 2003.06.02 // // HISTORY : // Datetime Action Author Reason // ------------------------------------------------------------------- // 2003.06.02 Creation ZhaoTiger // //****************************************************************** #ifndef _SERVER_DEFINE_H #define _SERVER_DEFINE_H typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; #define MAX_TABLE_NAME_ENG_LEN 32 #define MAX_TABLE_NAME_CHN_LEN 64 #define MAX_COLUMN_NAME_ENG_LEN 32 #define MAX_COLUMN_NAME_CHN_LEN 64 #define MAX_MENU_NAME_LEN 40 #define MAX_STRING_DATA_LEN 4096 #define MAX_FAIL_REASON_LEN 200 #define MODIFY_OP_INSERT 0 #define MODIFY_OP_DELETE 1 #define MODIFY_OP_UPDATE 2 #define MODIFY_OP_DELALL 3 #define KEY_GENERATE_NONE 0 #define KEY_GENERATE_TABLE 1 #define KEY_GENERATE_NORMAL 2 // 域信息表中data_type, 引用sys_menu_info中的菜单定义值 // 定义统一数据库数据类型 #define UNI_DATATYPE_CHAR 1 #define UNI_DATATYPE_STRING 2 #define UNI_DATATYPE_UCHAR 3 #define UNI_DATATYPE_SHORT 4 #define UNI_DATATYPE_INT 5 #define UNI_DATATYPE_FLOAT 6 #define UNI_DATATYPE_DOUBLE 7 #define UNI_DATATYPE_DATETIME 8 #define UNI_DATATYPE_KEYID 9 #define UNI_DATATYPE_BINARY 10 #define UNI_DATATYPE_TEXT 11 #define UNI_DATATYPE_IMAGE 12 #define UNI_DATATYPE_APPKEYID 13 #define UNI_DATATYPE_APPID 14 #define UNI_DATATYPE_LONG 15 #define UNI_DATATYPE_RTDBKEY 16 #define UNI_DATATYPE_MEASRTDBKEY 17 #define UNI_DATATYPE_APPRTDBKEY 18 // 定义出错代码 #define DB_SERVER_SUCCESS 0 #define DB_SERVER_ERR_NO_TABLE -1 #define DB_SERVER_ERR_QUERY_FAIL -2 #define DB_SERVER_ERR_MEMORY_FAIL -3 #define DB_SERVER_ERR_WRONG_APP -4 #define DB_SERVER_ERR_NO_COLUMN -5 #define DB_SERVER_ERR_WRONG_DATATYPE -6 #define DB_SERVER_ERR_WRONG_REC_APP -7 #define DB_SERVER_ERR_WRONG_KEY_INFO -8 #define DB_SERVER_ERR_NO_MATCH -9 #define DB_SERVER_ERR_NO_TABLE_STR "该表不存在" #define DB_SERVER_ERR_QUERY_FAIL_STR "检索过程出错" #define DB_SERVER_ERR_MEMORY_FAIL_STR "内存分配出错" #define DB_SERVER_ERR_WRONG_APP_STR "应用号出错" #define DB_SERVER_ERR_NO_COLUMN_STR "SQL中SELECT子句没有域" #define DB_SERVER_ERR_WRONG_DATATYPE_STR "不支持的数据类型" #define DB_SERVER_ERR_WRONG_REC_APP_STR "缺少record_app域" #define DB_SERVER_ERR_WRONG_KEY_INFO_STR "部分下装时关键字信息出错" #define DB_SERVER_ERR_NO_MATCH_STR "触发规则不匹配" #endif