/* FreeTDS - Library of routines accessing Sybase and Microsoft databases
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Brian Bruns
* Copyright (C) 2010, 2011 Frediano Ziglio
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/** \file ../include/sybdb.h
* \brief Primary include file for db-lib applications.
*
* Declares macros, functions, enumerated types, and defined tokens
* used by the db-lib API.
*/
#ifndef _sybdb_h_
#define _sybdb_h_
#include "tds_sysdep_public.h"
#undef TDS_STATIC_CAST
#ifdef __cplusplus
#define TDS_STATIC_CAST(type, a) static_cast<type>(a)
extern "C"
{
#if 0
}
#endif
#else
#define TDS_STATIC_CAST(type, a) ((type)(a))
#endif
#ifdef FALSE
#undef FALSE
#endif
#ifdef TRUE
#undef TRUE
#endif
#define FALSE 0
#define TRUE 1
#define DBSAVE 1
#define DBNOSAVE 0
#define DBNOERR -1
#define INT_EXIT 0
#define INT_CONTINUE 1
#define INT_CANCEL 2
#define INT_TIMEOUT 3
#define DBMAXNUMLEN 33
/* https://msdn.microsoft.com/en-us/library/ms176061.aspx */
#define DBMAXNAME 128
/**
* DBVERSION_xxx are used with dbsetversion()
*/
#define DBVERSION_UNKNOWN 0
#define DBVERSION_46 1
#define DBVERSION_100 2
#define DBVERSION_42 3
#define DBVERSION_70 4
#define DBVERSION_71 5
#define DBVERSION_72 6
#define DBVERSION_73 7
#define DBVERSION_74 8
/* these two are defined by Microsoft for dbsetlversion() */
#define DBVER42 DBVERSION_42
#define DBVER60 DBVERSION_70 /* our best approximation */
/**
* DBTDS_xxx are returned by DBTDS()
* The integer values of the constants are poorly chosen.
*/
#define DBTDS_UNKNOWN 0
#define DBTDS_2_0 1 /* pre 4.0 SQL Server */
#define DBTDS_3_4 2 /* Microsoft SQL Server (3.0) */
#define DBTDS_4_0 3 /* 4.0 SQL Server */
#define DBTDS_4_2 4 /* 4.2 SQL Server */
#define DBTDS_4_6 5 /* 2.0 OpenServer and 4.6 SQL Server. */
#define DBTDS_4_9_5 6 /* 4.9.5 (NCR) SQL Server */
#define DBTDS_5_0 7 /* 5.0 SQL Server */
#define DBTDS_7_0 8 /* Microsoft SQL Server 7.0 */
#define DBTDS_8_0 9 /* Microsoft SQL Server 2000 */
#define DBTDS_9_0 10 /* Microsoft SQL Server 2005 */
#define DBTDS_7_1 9 /* Microsoft SQL Server 2000 */
#define DBTDS_7_2 10 /* Microsoft SQL Server 2005 */
#define DBTDS_7_3 11 /* Microsoft SQL Server 2008 */
#define DBTDS_7_4 12 /* Microsoft SQL Server 2012/2014 */
#define DBTXPLEN 16
#define BCPMAXERRS 1
#define BCPFIRST 2
#define BCPLAST 3
#define BCPBATCH 4
#define BCPKEEPIDENTITY 8
#define BCPLABELED 5
#define BCPHINTS 6
#define DBCMDNONE 0
#define DBCMDPEND 1
#define DBCMDSENT 2
typedef int RETCODE;
typedef void DBCURSOR;
typedef void DBXLATE;
typedef void DBSORTORDER;
typedef void DBLOGINFO;
typedef void *DBVOIDPTR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef int (*INTFUNCPTR) (void *, ...);
typedef int (*DBWAITFUNC) (void);
typedef DBWAITFUNC(*DB_DBBUSY_FUNC) (void *dbproc);
typedef void (*DB_DBIDLE_FUNC) (DBWAITFUNC dfunc, void *dbproc);
typedef int (*DB_DBCHKINTR_FUNC) (void *dbproc);
typedef int (*DB_DBHNDLINTR_FUNC) (void *dbproc);
#ifndef __INCvxWorksh
/* VxWorks already defines STATUS and BOOL. Compiler gets mad if you
** redefine them. */
/* __INCvxWorksh will get #defined by std. include files included from tds.h
*/
#ifdef STATUS
/* On DU4.0d we get a conflicting STATUS definition from arpa/nameser.h
when _REENTRANT is defined.
*/
#undef STATUS
#endif
typedef int STATUS;
#if !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(DOS32X)
typedef int BOOL;
#endif
#endif
#ifndef _tds_h_
/* copied from tds.h */
/* TODO find a best way... */
enum
{
SYBCHAR = 47, /* 0x2F */
#define SYBCHAR SYBCHAR
SYBVARCHAR = 39, /* 0x27 */
#define SYBVARCHAR SYBVARCHAR
SYBINTN = 38, /* 0x26 */
#define SYBINTN SYBINTN
SYBINT1 = 48, /* 0x30 */
#define SYBINT1 SYBINT1
SYBINT2 = 52, /* 0x34 */
#define SYBINT2 SYBINT2
SYBINT4 = 56, /* 0x38 */
#define SYBINT4 SYBINT4
SYBINT8 = 127, /* 0x7F */
#define SYBINT8 SYBINT8
SYBFLT8 = 62, /* 0x3E */
#define SYBFLT8 SYBFLT8
SYBDATETIME = 61, /* 0x3D */
#define SYBDATETIME SYBDATETIME
SYBBIT = 50, /* 0x32 */
#define SYBBIT SYBBIT
SYBBITN = 104, /* 0x68 */
#define SYBBITN SYBBITN
SYBTEXT = 35, /* 0x23 */
#define SYBTEXT SYBTEXT
SYBNTEXT = 99, /* 0x63 */
#define SYBNTEXT SYBNTEXT
SYBIMAGE = 34, /* 0x22 */
#define SYBIMAGE SYBIMAGE
SYBMONEY4 = 122, /* 0x7A */
#define SYBMONEY4 SYBMONEY4
SYBMONEY = 60, /* 0x3C */
#define SYBMONEY SYBMONEY
SYBDATETIME4 = 58, /* 0x3A */
#define SYBDATETIME4 SYBDATETIME4
SYBREAL = 59, /* 0x3B */
#define SYBREAL SYBREAL
SYBBINARY = 45, /* 0x2D */
#define SYBBINARY SYBBINARY
SYBVOID = 31, /* 0x1F */
#define SYBVOID SYBVOID
SYBVARBINARY = 37, /* 0x25 */
#define SYBVARBINARY SYBVARBINARY
SYBNUMERIC = 108, /* 0x6C */
#define SYBNUMERIC SYBNUMERIC
SYBDECIMAL = 106, /* 0x6A */
#define SYBDECIMAL SYBDECIMAL
SYBFLTN = 109, /* 0x6D */
#define SYBFLTN SYBFLTN
SYBMONEYN = 110, /* 0x6E */
#define SYBMONEYN SYBMONEYN
SYBDATETIMN = 111, /* 0x6F */
#define SYBDATETIMN SYBDATETIMN
SYBNVARCHAR = 103, /* 0x67 */
#define SYBNVARCHAR SYBNVARCHAR
SYBDATE = 49, /* 0x31 */
#define SYBDATE SYBDATE
SYBTIME = 51, /* 0x33 */
#define SYBTIME SYBTIME
SYBBIGDATETIME = 187, /* 0xBB */
#define SYBBIGDATETIME SYBBIGDATETIME
SYBBIGTIME = 188, /* 0xBC */
#define SYBBIGTIME SYBBIGTIME
SYBMSDATE = 40, /* 0x28 */
#define SYBMSDATE SYBMSDATE
SYBMSTIME = 41, /* 0x29 */
#define SYBMSTIME SYBMSTIME
SYBMSDATETIME2 = 42, /* 0x2A */
#define SYBMSDATETIME2 SYBMSDATETIME2
SYBMSDATETIMEOFFSET = 43, /* 0x2B */
#define SYBMSDATETIMEOFFSET SYBMSDATETIMEOFFSET
};
#define SYBAOPCNT 0x4b
#define SYBAOPCNTU 0x4c
#define SYBAOPSUM 0x4d
#define SYBAOPSUMU 0x4e
#define SYBAOPAVG 0x4f
#define SYBAOPAVGU 0x50
#define SYBAOPMIN 0x51
#define SYBAOPMAX 0x52
/* mssql2k compute operator */
#define SYBAOPCNT_BIG 0x09
#define SYBAOPSTDEV 0x30
#define SYBAOPSTDEVP 0x31
#define SYBAOPVAR 0x32
#define SYBAOPVARP 0x33
#define SYBAOPCHECKSUM_AGG 0x72
#endif
typedef unsigned char DBBOOL;
typedef char DBCHAR;
typedef unsigned char DBBIT;
typedef unsigned char DBTINYINT;
typedef int16_t DBSMALLINT;
typedef int32_t DBINT;
typedef int64_t DBBIGINT;
typedef unsigned char DBBINARY;
typedef tds_sysdep_real32_type DBREAL;
typedef tds_sysdep_real64_type DBFLT8;
typedef uint16_t DBUSMALLINT;
typedef uint32_t DBUINT;
typedef uint64_t DBUBIGINT;
typedef struct
{
DBSMALLINT len;
char str[256];
} DBVARYCHAR;
typedef struct
{
DBSMALLINT len;
unsigned char array[256];
} DBVARYBIN;
typedef struct
{
unsigned char precision;
unsigned char scale;
unsigned char array[33];
} DBNUMERIC;
typedef DBNUMERIC DBDECIMAL;
typedef struct
{
DBINT mnyhigh;
DBUINT mnylow;
} DBMONEY;
typedef struct
{
DBINT mny4;
} DBMONEY4;
typedef struct
{
DBINT dtdays;
DBINT dttime;
} DBDATETIME;
typedef struct
{
DBUSMALLINT days; /* days since Jan-1-1900 */
DBUSMALLINT minutes; /* minutes since midnight */
} DBDATETIME4;
typedef struct
{
DBUBIGINT time; /**< time, 7 digit precision */
DBINT date; /**< date, 0 = 1900-01-01 */
DBSMALLINT offset; /**< time offset */
DBUSMALLIN
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
主要需要以下库文件(/freetds/usr/lib) libct.so libct.so.4 libct.so.4.0.0 libsybdb.so libsybdb.so.5 libsybdb.so.5.1.0(连接MS SQL SERVER最重要,我连的是2008 R2版) libtdsodbc.so libtdsodbc.so.0 libtdsodbc.so.0.0.0
资源详情
资源评论
资源推荐
收起资源包目录





































































































共 1257 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13



























swinkworld
- 粉丝: 0
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 供选择的题目也可自己搜集题目基于单片机技术的数据采集.doc
- 算法分析与设计动态规划ppt课件.ppt
- 拒绝网络不良诱惑.pptx
- 2022年下半年软件设计师考试下午真题案例分析题.doc
- 电子商务人才培养体系研究.doc
- 信息化技术在小学数学教学中的有效应用分析优秀科研论文报告论文6.docx
- 项目管理整体实施方案内容及工作流程.doc
- 环境影响评价常用软件.ppt
- 科技项目管理系统图.pdf
- 信息系统项目管理师常见计算题详解总结.doc
- (源码)基于TensorFlow 2.x的YOLOv7目标检测模型.zip
- 拓展互联网-合作方案.doc
- 工业机器人现场编程运动模式操纵.pptx
- 2023年计算机基础知识试题及答案精华版.doc
- 工程总承包模式及其项目管理要点(附案例).ppt
- 基于单片机的电梯控制系统的设计之开题报告.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0