FreeTDS API: include/sybdb.h File Reference

- Main Page
- Modules
- Classes
- Files
- Related Pages

# include/sybdb.h File Reference

Primary include file for db-lib applications. More...

`#include "tds_sysdep_public.h"`

Go to the source code of this file.

## Classes
struct | DBCOL
struct | dbdaterec
struct | DBDATETIME
struct | DBDATETIME4
struct | DBMONEY
struct | DBMONEY4
struct | DBNUMERIC
struct | dbstring
struct | dbtypeinfo
struct | DBVARYCHAR
## Defines
#define | BCP_SETL(x, y) dbsetlbool((x), (y), DBSETBCP)
#define | BCP_SETLABELED(x, y) dbsetlbool((x), (y), DBSETLABELED)
#define | BCPBATCH 4
#define | BCPFIRST 2
#define | BCPHINTS 6
#define | BCPKEEPIDENTITY 8
#define | BCPLABELED 5
#define | BCPLAST 3
#define | BCPMAXERRS 1
#define | BINARYBIND 15
#define | BITBIND 16
#define | BUF_FULL -3
#define | CHARBIND 0
#define | DATETIMEBIND 11
#define | DB_IN 1
#define | DB_OUT 2
#define | DB_QUERYOUT 3
#define | DBARITHABORT 6
#define | DBARITHIGNORE 4
#define | DBAUTH 29
#define | DBBOTH 2
#define | DBBROWSE 8
#define | DBBUFFER 14
#define | DBCHAINXACTS 26
#define | DBCLIENTCURSORS 33
#define | DBCMDNONE 0
#define | DBCMDPEND 1
#define | DBCMDROW(x) dbcmdrow((x))
#define | DBCMDSENT 2
#define | DBCONFIRM 12
#define | DBCOUNT(x) dbcount((x))
#define | DBCURCMD(x) dbcurcmd((x))
#define | DBCURROW(x) dbcurrow((x))
#define | DBDATEFIRST 25
#define | DBDATEFORMAT 19
#define | DBDATESHORT 32
#define | DBDEAD(x) dbdead((x))
#define | DBDOUBLE 1
#define | DBERRLVL 11
#define | DBESTIMATE 1
#define | DBFIPSFLAG 27
#define | DBFIRSTROW(x) dbfirstrow((x))
#define | DBGETTIME dbgettime
#define | DBIDENTITY 30
#define | DBINTERRUPT 4
#define | DBIORDESC(x) dbiordesc((x))
#define | DBIOWDESC(x) dbiowdesc((x))
#define | DBISAVAIL(x) dbisavail((x))
#define | DBISOLATION 28
#define | DBLASTROW(x) dblastrow((x))
#define | DBLFCONVERT 24
#define | DBMAXNAME 30
#define | DBMAXNUMLEN 33
#define | DBMORECMDS(x) dbmorecmds((x))
#define | DBNATLANG 18
#define | DBNOAUTOFREE 15
#define | DBNOCOUNT 5
#define | DBNOERR -1
#define | DBNOEXEC 3
#define | DBNOIDCOL 31
#define | DBNOSAVE 0
#define | DBNOTIFICATION 2
#define | DBNUMOPTIONS 36
#define | DBOFFSET 9
#define | dbopen(x, y) tdsdbopen((x),(y), 0)
#define | DBPADOFF 0
#define | DBPADON 1
#define | DBPARSEONLY 0
#define | DBPRCOLSEP 21
#define | DBPRLINELEN 22
#define | DBPRLINESEP 23
#define | DBPRPAD 20
#define | DBQUOTEDIDENT 35
#define | DBRESULT 1
#define | DBROWCOUNT 16
#define | DBROWS(x) dbrows((x))
#define | DBROWTYPE(x) dbrowtype((x))
#define | DBRPCCURSOR TDS_STATIC_CAST(DBSMALLINT, 0x0008)
#define | DBRPCDEFAULT 2
#define | DBRPCRECOMPILE TDS_STATIC_CAST(DBSMALLINT, 0x0001)
#define | DBRPCRESET TDS_STATIC_CAST(DBSMALLINT, 0x0002)
#define | DBRPCRETURN 1
#define | DBSAVE 1
#define | DBSETAPP 5
#define | DBSETBCP 6
#define | DBSETCHARSET 10
#define | DBSETENCRYPT 12
#define | DBSETHID 4
#define | DBSETHIER 9
#define | DBSETHOST 1
#define | DBSETLABELED 13
#define | dbsetlapp(x, y) dbsetlname((x), (y), DBSETAPP)
#define | DBSETLCHARSET(x, y) dbsetlname((x), (y), DBSETCHARSET)
#define | DBSETLENCRYPT(x, y) dbsetlbool((x), (y), DBSETENCRYPT)
#define | DBSETLHID(x, y) dbsetlname((x), (y), DBSETHID)
#define | DBSETLHIER(x, y) dbsetlshort((x), (y), DBSETHIER)
#define | dbsetlhost(x, y) dbsetlname((x), (y), DBSETHOST)
#define | DBSETLLABELED(x, y) dbsetlbool((x), (y), DBSETLABELED)
#define | dbsetlnatlang(x, y) dbsetlname((x), (y), DBSETNATLANG)
#define | DBSETLNOSHORT(x, y) dbsetlbool((x), (y), DBSETNOSHORT)
#define | dbsetlpacket(x, y) dbsetllong((x), (y), DBSETPACKET)
#define | dbsetlpwd(x, y) dbsetlname((x), (y), DBSETPWD)
#define | dbsetluser(x, y) dbsetlname((x), (y), DBSETUSER)
#define | DBSETLVERSION(login, version) dbsetlversion((login), (version))
#define | DBSETNATLANG 7
#define | DBSETNOSHORT 8
#define | DBSETPACKET 11
#define | DBSETPWD 3
#define | DBSETTIME 34
#define | DBSETUSER 2
#define | DBSHOWPLAN 2
#define | DBSINGLE 0
#define | DBSTAT 10
#define | DBSTORPROCID 13
#define | DBTDS(a) dbtds(a)
#define | DBTDS_2_0 1
#define | DBTDS_3_4 2
#define | DBTDS_4_0 3
#define | DBTDS_4_2 4
#define | DBTDS_4_6 5
#define | DBTDS_4_9_5 6
#define | DBTDS_5_0 7
#define | DBTDS_7_0 8
#define | DBTDS_8_0 9
#define | DBTDS_9_0 10
#define | DBTDS_UNKNOWN 0
| DBTDS_xxx are returned by DBTDS() The integer values of the constants are poorly chosen.
#define | DBTEXTLIMIT 7
#define | DBTEXTSIZE 17
#define | DBTIMEOUT 3
#define | DBTXPLEN 16
#define | DBTXTSLEN 8
#define | DBVER42 DBVERSION_42
#define | DBVER60 DBVERSION_70
#define | DBVERSION_100 2
#define | DBVERSION_42 3
#define | DBVERSION_46 1
#define | DBVERSION_70 4
#define | DBVERSION_80 5
#define | DBVERSION_UNKNOWN 0
| DBVERSION_xxx are used with dbsetversion().
#define | DECIMALBIND 18
#define | FAIL 0
#define | FALSE 0
#define | FLT8BIND 9
#define | INT_CANCEL 2
#define | INT_CONTINUE 1
#define | INT_EXIT 0
#define | INT_TIMEOUT 3
#define | INTBIND 8
#define | MAXBINDTYPES 19
#define | MAXOPTTEXT 32
#define | MONEYBIND 13
#define | MORE_ROWS -1
#define | NO_MORE_RESULTS 2
#define | NO_MORE_ROWS -2
#define | NOSUCHOPTION 2
#define | NTBSTRINGBIND 2
#define | NUMERICBIND 17
#define | OFF 0
#define | ON 1
#define | REALBIND 10
#define | REG_ROW -1
#define | SMALLBIND 7
#define | SMALLDATETIMEBIND 12
#define | SMALLMONEYBIND 14
#define | STRINGBIND 1
#define | SUCCEED 1
#define | SYBAOPAVG 0x4f
#define | SYBAOPAVGU 0x50
#define | SYBAOPCHECKSUM_AGG 0x72
#define | SYBAOPCNT 0x4b
#define | SYBAOPCNT_BIG 0x09
#define | SYBAOPCNTU 0x4c
#define | SYBAOPMAX 0x52
#define | SYBAOPMIN 0x51
#define | SYBAOPSTDEV 0x30
#define | SYBAOPSTDEVP 0x31
#define | SYBAOPSUM 0x4d
#define | SYBAOPSUMU 0x4e
#define | SYBAOPVAR 0x32
#define | SYBAOPVARP 0x33
#define | SYBBINARY SYBBINARY
#define | SYBBIT SYBBIT
#define | SYBCHAR SYBCHAR
#define | SYBDATETIME SYBDATETIME
#define | SYBDATETIME4 SYBDATETIME4
#define | SYBDATETIMN SYBDATETIMN
#define | SYBDECIMAL SYBDECIMAL
#define | SYBEAAMT 20035
#define | SYBEABMT 20033
#define | SYBEABNC 20032
#define | SYBEABNP 20034
#define | SYBEABNV 20046
#define | SYBEACNV 20148
#define | SYBEADST 20128
#define | SYBEAICF 20127
#define | SYBEALTT 20129
#define | SYBEAOLF 20133
#define | SYBEAPCT 20130
#define | SYBEAPUT 20040
#define | SYBEARDI 20134
#define | SYBEARDL 20136
#define | SYBEASEC 20091
#define | SYBEASNL 20041
#define | SYBEASTF 20089
#define | SYBEASTL 20197
#define | SYBEASUL 20043
#define | SYBEATTNACK 20296
#define | SYBEAUTN 20062
#define | SYBEBADPK 20201
#define | SYBEBADTYPE 20254
#define | SYBEBBCI 20068
#define | SYBEBBFL 20297
#define | SYBEBBL 20215
#define | SYBEBCBC 20081
#define | SYBEBCBNPR 20230
#define | SYBEBCBNTYP 20231
#define | SYBEBCBPREF 20236
#define | SYBEBCFO 20082
#define | SYBEBCHLEN 20235
#define | SYBEBCIS 20075
#define | SYBEBCIT 20107
#define | SYBEBCITBLEN 20239
#define | SYBEBCITBNM 20238
#define | SYBEBCMTXT 20228
#define | SYBEBCNL 20105
#define | SYBEBCNN 20073
#define | SYBEBCNT 20064
#define | SYBEBCOR 20074
#define | SYBEBCPB 20078
#define | SYBEBCPCTYP 20233
#define | SYBEBCPI 20076
#define | SYBEBCPN 20077
#define | SYBEBCPOPT 20294
#define | SYBEBCPREC 20229
#define | SYBEBCPREF 20237
#define | SYBEBCRE 20070
#define | SYBEBCRO 20111
#define | SYBEBCSA 20108
#define | SYBEBCSET 20221
#define | SYBEBCSI 20106
#define | SYBEBCSNDROW 20240
#define | SYBEBCSNTYP 20232
#define | SYBEBCUC 20085
#define | SYBEBCUO 20084
#define | SYBEBCVH 20083
#define | SYBEBCVLEN 20234
#define | SYBEBCWE 20072
#define | SYBEBDIO 20063
#define | SYBEBEOF 20104
#define | SYBEBIHC 20103
#define | SYBEBIVI 20080
#define | SYBEBNCR 20024
#define | SYBEBNUM 20214
#define | SYBEBOOL 20293
#define | SYBEBPKS 20193
#define | SYBEBPREC 20216
#define | SYBEBPROBADDEF 20249
#define | SYBEBPROBADLEN 20251
#define | SYBEBPROBADPREC 20252
#define | SYBEBPROBADSCL 20253
#define | SYBEBPROBADTYP 20250
#define | SYBEBPROCOL 20241
#define | SYBEBPRODEF 20242
#define | SYBEBPRODEFID 20244
#define | SYBEBPRODEFTYP 20246
#define | SYBEBPROEXTDEF 20247
#define | SYBEBPROEXTRES 20248
#define | SYBEBPRONODEF 20245
#define | SYBEBPRONUMDEF 20243
#define | SYBEBRFF 20100
#define | SYBEBSCALE 20217
#define | SYBEBTMT 20095
#define | SYBEBTOK 20020
#define | SYBEBTYP 20023
#define | SYBEBTYPSRV 20220
#define | SYBEBUCE 20087
#define | SYBEBUCF 20099
#define | SYBEBUDF 20102
#define | SYBEBUFF 20147
#define | SYBEBUFL 20005
#define | SYBEBULKINSERT 20599
#define | SYBEBUOE 20086
#define | SYBEBUOF 20098
#define | SYBEBWEF 20088
#define | SYBEBWFF 20101
#define | SYBECAP 20203
#define | SYBECAPTYP 20213
#define | SYBECDNS 20031
#define | SYBECDOMAIN 20218
#define | SYBECINTERNAL 20219
#define | SYBECLOS 20056
#define | SYBECLOSEIN 20292
#define | SYBECLPR 20051
#define | SYBECNOR 20026
#define | SYBECNOV 20052
#define | SYBECOFL 20049
#define | SYBECONN 20009
#define | SYBECRNC 20116
#define | SYBECRSAGR 20263
#define | SYBECRSBROL 20266
#define | SYBECRSBSKEY 20268
#define | SYBECRSBUFR 20260
#define | SYBECRSDIS 20262
#define | SYBECRSFLAST 20265
#define | SYBECRSFRAND 20264
#define | SYBECRSFROWN 20267
#define | SYBECRSFTYPE 20280
#define | SYBECRSINV 20277
#define | SYBECRSINVALID 20281
#define | SYBECRSMROWS 20282
#define | SYBECRSNOBIND 20279
#define | SYBECRSNOCOUNT 20270
#define | SYBECRSNOFREE 20261
#define | SYBECRSNOIND 20256
#define | SYBECRSNOKEYS 20278
#define | SYBECRSNOLEN 20284
#define | SYBECRSNOPTCC 20285
#define | SYBECRSNORDER 20286
#define | SYBECRSNORES 20255
#define | SYBECRSNOTABLE 20287
#define | SYBECRSNOUPD 20276
#define | SYBECRSNOWHERE 20273
#define | SYBECRSNROWS 20283
#define | SYBECRSNUNIQUE 20288
#define | SYBECRSORD 20259
#define | SYBECRSRO 20269
#define | SYBECRSSET 20274
#define | SYBECRSTAB 20271
#define | SYBECRSUPDNB 20272
#define | SYBECRSUPDTAB 20275
#define | SYBECRSVAR 20289
#define | SYBECRSVIEW 20257
#define | SYBECRSVIIND 20258
#define | SYBECS 20299
#define | SYBECSYN 20050
#define | SYBECUFL 20048
#define | SYBECWLL 20123
#define | SYBEDBPS 20011
#define | SYBEDCL 20298
#define | SYBEDDNE 20047
#define | SYBEDIVZ 20196
#define | SYBEDNTI 20094
#define | SYBEDPOR 20149
#define | SYBEDVOR 20152
#define | SYBEECAN 20184
#define | SYBEECRT 20183
#define | SYBEEINI 20182
#define | SYBEEQVA 20059
#define | SYBEERRLABEL 20295
#define | SYBEESSL 20172
#define | SYBEETD 20164
#define | SYBEEUNR 20185
#define | SYBEEVOP 20178
#define | SYBEEVST 20181
#define | SYBEFCON 20002
#define | SYBEFENC 20222
#define | SYBEFGTL 20122
#define | SYBEFMODE 20167
#define | SYBEFRES 20223
#define | SYBEFSHD 20132
#define | SYBEFUNC 20204
#define | SYBEGENOS 20161
#define | SYBEICN 20038
#define | SYBEICONV2BIG 2404
#define | SYBEICONVAVAIL 2401
#define | SYBEICONVI 2403
#define | SYBEICONVIU 2400
#define | SYBEICONVO 2402
#define | SYBEIDCL 20143
#define | SYBEIDECCL 20227
#define | SYBEIFCL 20145
#define | SYBEIFNB 20065
#define | SYBEIICL 20025
#define | SYBEIMCL 20144
#define | SYBEINLN 20016
#define | SYBEINTF 20012
#define | SYBEINUMCL 20226
#define | SYBEIPV 20194
#define | SYBEISOI 20142
#define | SYBEISRVPREC 20224
#define | SYBEISRVSCL 20225
#define | SYBEITIM 20021
#define | SYBEIVERS 20206
#define | SYBEKBCI 20069
#define | SYBEKBCO 20067
#define | SYBELBLEN 20211
#define | SYBEMEM 20010
#define | SYBEMOV 20195
#define | SYBEMPLL 20112
#define | SYBEMVOR 20151
#define | SYBENBUF 20175
#define | SYBENBVP 20153
#define | SYBENDC 20150
#define | SYBENDTP 20155
#define | SYBENEG 20210
#define | SYBENEHA 20179
#define | SYBENHAN 20174
#define | SYBENLNL 20173
#define | SYBENMOB 20039
#define | SYBENOEV 20200
#define | SYBENOTI 20177
#define | SYBENOVALUE 20290
#define | SYBENPRM 20027
#define | SYBENSIP 20045
#define | SYBENTLL 20042
#define | SYBENTST 20170
#define | SYBENTTN 20093
#define | SYBENULL 20109
#define | SYBENULP 20176
#define | SYBENUM 20159
#define | SYBENXID 20036
#define | SYBEONCE 20207
#define | SYBEOOB 20022
#define | SYBEOPIN 20015
#define | SYBEOPNA 20121
#define | SYBEOPTNO 20163
#define | SYBEOREN 20141
#define | SYBEORPF 20096
#define | SYBEOSSL 20171
#define | SYBEPAGE 20162
#define | SYBEPOLL 20199
#define | SYBEPRTF 20191
#define | SYBEPWD 20014
#define | SYBERDCN 20053
#define | SYBERDNR 20044
#define | SYBEREAD 20004
#define | SYBERESP 20205
#define | SYBERFILE 20166
#define | SYBERPCS 20186
#define | SYBERPIL 20113
#define | SYBERPNA 20120
#define | SYBERPND 20019
#define | SYBERPNULL 20208
#define | SYBERPTXTIM 20209
#define | SYBERPUL 20114
#define | SYBERTCC 20117
#define | SYBERTSC 20118
#define | SYBERTYPE 20165
#define | SYBERXID 20037
#define | SYBESECURE 20202
#define | SYBESEFA 20198
#define | SYBESEOF 20017
#define | SYBESFOV 20054
#define | SYBESLCT 20168
#define | SYBESMSG 20018
#define | SYBESOCK 20008
#define | SYBESPID 20154
#define | SYBESYNC 20001
#define | SYBETDSVER 2410
#define | SYBETEXS 20188
#define | SYBETIME 20003
#define | SYBETMCF 20126
#define | SYBETMTD 20092
#define | SYBETPAR 20187
#define | SYBETPTN 20071
#define | SYBETRAC 20189
#define | SYBETRAN 20180
#define | SYBETRAS 20190
#define | SYBETRSN 20192
#define | SYBETSIT 20061
#define | SYBETTS 20066
#define | SYBETYPE 20160
#define | SYBEUACS 20090
#define | SYBEUAVE 20057
#define | SYBEUCPT 20125
#define | SYBEUCRR 20119
#define | SYBEUDTY 20060
#define | SYBEUFDS 20124
#define | SYBEUFDT 20029
#define | SYBEUHST 20013
#define | SYBEUMSG 20212
#define | SYBEUNAM 20110
#define | SYBEUNOP 20115
#define | SYBEUNT 20055
#define | SYBEURCI 20135
#define | SYBEUREI 20140
#define | SYBEUREM 20138
#define | SYBEURES 20139
#define | SYBEURMI 20137
#define | SYBEUSCT 20058
#define | SYBEUTDS 20146
#define | SYBEUVBF 20097
#define | SYBEUVDT 20028
#define | SYBEVDPT 20079
#define | SYBEVMS 20007
#define | SYBEVOIDRET 20291
#define | SYBEWAID 20030
#define | SYBEWRIT 20006
#define | SYBEXOCI 20131
#define | SYBEXTDN 20157
#define | SYBEXTN 20156
#define | SYBEXTSN 20158
#define | SYBEZTXT 20169
#define | SYBFLT8 SYBFLT8
#define | SYBFLTN SYBFLTN
#define | SYBIMAGE SYBIMAGE
#define | SYBINT1 SYBINT1
#define | SYBINT2 SYBINT2
#define | SYBINT4 SYBINT4
#define | SYBINT8 SYBINT8
#define | SYBINTN SYBINTN
#define | SYBMONEY SYBMONEY
#define | SYBMONEY4 SYBMONEY4
#define | SYBMONEYN SYBMONEYN
#define | SYBNUMERIC SYBNUMERIC
#define | SYBREAL SYBREAL
#define | SYBTEXT SYBTEXT
#define | SYBVARBINARY SYBVARBINARY
#define | SYBVARCHAR SYBVARCHAR
#define | TDS_STATIC_CAST(type, a) ((type)(a))
#define | TINYBIND 6
#define | TRUE 1
#define | VARYBINBIND 4
#define | VARYCHARBIND 3
## Typedefs
typedef int | BOOL
typedef unsigned char | BYTE
typedef DBWAITFUNC(* | DB_DBBUSY_FUNC )(void *dbproc)
typedef int(* | DB_DBCHKINTR_FUNC )(void *dbproc)
typedef int(* | DB_DBHNDLINTR_FUNC )(void *dbproc)
typedef void(* | DB_DBIDLE_FUNC )(DBWAITFUNC dfunc, void *dbproc)
typedef unsigned char | DBBINARY
typedef unsigned char | DBBIT
typedef unsigned char | DBBOOL
typedef char | DBCHAR
typedef void | DBCURSOR
typedef struct dbdaterec | DBDATEREC
typedef DBNUMERIC | DBDECIMAL
typedef tds_sysdep_real64_type | DBFLT8
typedef tds_sysdep_int32_type | DBINT
typedef void | DBLOGINFO
typedef struct tds_dblib_dbprocess | DBPROCESS
typedef tds_sysdep_real32_type | DBREAL
typedef tds_sysdep_int16_type | DBSMALLINT
typedef void | DBSORTORDER
typedef struct dbstring | DBSTRING
typedef unsigned char | DBTINYINT
typedef struct dbtypeinfo | DBTYPEINFO
typedef unsigned tds_sysdep_int16_type | DBUSMALLINT
typedef void * | DBVOIDPTR
typedef int(* | DBWAITFUNC )(void)
typedef void | DBXLATE
typedef int(* | EHANDLEFUNC )(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
typedef int(* | INTFUNCPTR )(void *,...)
typedef struct tds_dblib_loginrec | LOGINREC
typedef int(* | MHANDLEFUNC )(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *proc, int line)
typedef int | RETCODE
typedef short | SHORT
typedef int | STATUS
typedef unsigned short | USHORT
## Enumerations
enum | { SYBCHAR = 47, SYBVARCHAR = 39, SYBINTN = 38, SYBINT1 = 48, SYBINT2 = 52, SYBINT4 = 56, SYBINT8 = 127, SYBFLT8 = 62, SYBDATETIME = 61, SYBBIT = 50, SYBTEXT = 35, SYBIMAGE = 34, SYBMONEY4 = 122, SYBMONEY = 60, SYBDATETIME4 = 58, SYBREAL = 59, SYBBINARY = 45, SYBVARBINARY = 37, SYBNUMERIC = 108, SYBDECIMAL = 106, SYBFLTN = 109, SYBMONEYN = 110, SYBDATETIMN }
enum | { MAXCOLNAMELEN = 512 }
enum | CI_TYPE { CI_REGULAR = 1, CI_ALTERNATE = 2, CI_CURSOR = 3 }
## Functions
RETCODE | abort_xact (DBPROCESS *connect, DBINT commid)
RETCODE | bcp_batch (DBPROCESS *dbproc)
| Commit a set of rows to the table.
RETCODE | bcp_bind (DBPROCESS *dbproc, BYTE *varaddr, int prefixlen, DBINT varlen, BYTE *terminator, int termlen, int type, int table_column)
| Bind a program host variable to a database column.
RETCODE | bcp_colfmt (DBPROCESS *dbproc, int host_column, int host_type, int host_prefixlen, DBINT host_collen, const BYTE *host_term, int host_termlen, int colnum)
| Specify the format of a datafile prior to writing to a table.
RETCODE | bcp_colfmt_ps (DBPROCESS *dbproc, int host_column, int host_type, int host_prefixlen, DBINT host_collen, BYTE *host_term, int host_termlen, int colnum, DBTYPEINFO *typeinfo)
| Specify the format of a host file for bulk copy purposes, with precision and scale support for numeric and decimal columns.
RETCODE | bcp_collen (DBPROCESS *dbproc, DBINT varlen, int table_column)
| Set the length of a host variable to be written to a table.
RETCODE | bcp_colptr (DBPROCESS *dbproc, BYTE *colptr, int table_column)
| Override bcp_bind() by pointing to a different host variable.
RETCODE | bcp_columns (DBPROCESS *dbproc, int host_colcount)
| Indicate how many columns are to be found in the datafile.
RETCODE | bcp_control (DBPROCESS *dbproc, int field, DBINT value)
| Set BCP options for uploading a datafile.
RETCODE | bcp_done (DBPROCESS *dbproc)
| Conclude the transfer of data from program variables.
RETCODE | bcp_exec (DBPROCESS *dbproc, DBINT *rows_copied)
| Write a datafile to a table.
int | bcp_getbatchsize (DBPROCESS *dbproc)
DBBOOL | bcp_getl (LOGINREC *login)
| See if BCP_SETL() was used to set the LOGINREC for BCP work.
RETCODE | bcp_init (DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)
| Prepare for bulk copy operation on a table.
RETCODE | bcp_moretext (DBPROCESS *dbproc, DBINT size, BYTE *text)
| Write some text or image data to the server.
RETCODE | bcp_options (DBPROCESS *dbproc, int option, BYTE *value, int valuelen)
| Set "hints" for uploading a file.
RETCODE | bcp_readfmt (DBPROCESS *dbproc, char *filename)
| Read a format definition file.
RETCODE | bcp_sendrow (DBPROCESS *dbproc)
| Write data in host variables to the table.
RETCODE | bcp_writefmt (DBPROCESS *dbproc, char *filename)
| Write a format definition file.
void | build_xact_string (char *xact_name, char *service_name, DBINT commid, char *result)
void | close_commit (DBPROCESS *connect)
RETCODE | commit_xact (DBPROCESS *connect, DBINT commid)
char * | dateorder (DBPROCESS *dbprocess, char *language)
DBBOOL | db12hour (DBPROCESS *dbprocess, char *language)
BYTE * | dbadata (DBPROCESS *dbproc, int computeid, int column)
| Get address of compute column data.
DBINT | dbadlen (DBPROCESS *dbproc, int computeid, int column)
| Get size of data in a compute column.
RETCODE | dbaltbind (DBPROCESS *dbprocess, int computeid, int column, int vartype, DBINT varlen, BYTE *varaddr)
| Bind a compute column to a program variable.
RETCODE | dbaltbind_ps (DBPROCESS *dbprocess, int computeid, int column, int vartype, DBINT varlen, BYTE *varaddr, DBTYPEINFO *typeinfo)
int | dbaltcolid (DBPROCESS *dbproc, int computeid, int column)
| Get column ID of a compute column.
RETCODE | dbaltlen (DBPROCESS *dbproc, int computeid, int column)
| Get size of data in compute column.
int | dbaltop (DBPROCESS *dbproc, int computeid, int column)
| Get aggregation operator for a compute column.
int | dbalttype (DBPROCESS *dbproc, int computeid, int column)
| Get datatype for a compute column.
RETCODE | dbaltutype (DBPROCESS *dbproc, int computeid, int column)
| Get user-defined datatype of a compute column.
RETCODE | dbanullbind (DBPROCESS *dbprocess, int computeid, int column, DBINT *indicator)
| Tie a null-indicator to a compute result column.
RETCODE | dbbind (DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr)
| Tie a host variable to a resultset column.
RETCODE | dbbind_ps (DBPROCESS *dbprocess, int column, int vartype, DBINT varlen, BYTE *varaddr, DBTYPEINFO *typeinfo)
int | dbbufsize (DBPROCESS *dbprocess)
BYTE * | dbbylist (DBPROCESS *dbproc, int computeid, int *size)
| Get `bylist` for a compute row.
RETCODE | dbcancel (DBPROCESS *dbproc)
| Cancel the current command batch.
RETCODE | dbcanquery (DBPROCESS *dbproc)
| Cancel the query currently being retrieved, discarding all pending rows.
char * | dbchange (DBPROCESS *dbprocess)
| See if a command caused the current database to change.
DBBOOL | dbcharsetconv (DBPROCESS *dbprocess)
void | dbclose (DBPROCESS *dbproc)
| Close a connection to the server and free associated resources.
void | dbclrbuf (DBPROCESS *dbproc, DBINT n)
| Clear n rows from the row buffer.
RETCODE | dbclropt (DBPROCESS *dbproc, int option, char *param)
| Reset an option.
RETCODE | dbcmd (DBPROCESS *dbproc, const char *cmdstring)
| `Append` SQL to the command buffer.
RETCODE | dbcmdrow (DBPROCESS *dbproc)
| For internal use only.
DBBOOL | dbcolbrowse (DBPROCESS *dbprocess, int colnum)
RETCODE | dbcolinfo (DBPROCESS *dbproc, CI_TYPE type, DBINT column, DBINT computeid, DBCOL *pdbcol)
| Get a bunch of column attributes with a single call (Microsoft-compatibility feature).
DBINT | dbcollen (DBPROCESS *dbproc, int column)
| Get size of a regular result column.
char * | dbcolname (DBPROCESS *dbproc, int column)
| Return name of a regular result column.
char * | dbcolsource (DBPROCESS *dbproc, int colnum)
| Get base database column name for a result set column.
int | dbcoltype (DBPROCESS *dbproc, int column)
| Get the datatype of a regular result set column.
DBTYPEINFO * | dbcoltypeinfo (DBPROCESS *dbproc, int column)
| Get precision and scale information for a regular result column.
DBINT | dbcolutype (DBPROCESS *dbprocess, int column)
| Get user-defined datatype of a regular result column.
DBINT | dbconvert (DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen)
| Convert one datatype to another.
DBINT | dbconvert_ps (DBPROCESS *dbprocess, int srctype, BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen, DBTYPEINFO *typeinfo)
| cf.
DBINT | dbcount (DBPROCESS *dbproc)
| For internal use only.
int | dbcurcmd (DBPROCESS *dbproc)
| For internal use only.
DBINT | dbcurrow (DBPROCESS *dbproc)
| For internal use only.
RETCODE | dbcursor (DBCURSOR *hc, DBINT optype, DBINT bufno, BYTE *table, BYTE *values)
RETCODE | dbcursorbind (DBCURSOR *hc, int col, int vartype, DBINT varlen, DBINT *poutlen, BYTE *pvaraddr, DBTYPEINFO *typeinfo)
void | dbcursorclose (DBCURSOR *hc)
RETCODE | dbcursorcolinfo (DBCURSOR *hc, DBINT column, DBCHAR *colname, DBINT *coltype, DBINT *collen, DBINT *usertype)
RETCODE | dbcursorfetch (DBCURSOR *hc, DBINT fetchtype, DBINT rownum)
RETCODE | dbcursorinfo (DBCURSOR *hc, DBINT *ncols, DBINT *nrows)
DBCURSOR * | dbcursoropen (DBPROCESS *dbprocess, BYTE *stmt, SHORT scollopt, SHORT concuropt, USHORT nrows, DBINT *pstatus)
BYTE * | dbdata (DBPROCESS *dbproc, int column)
| Get address of data in a regular result column.
int | dbdate4cmp (DBPROCESS *dbprocess, DBDATETIME4 *d1, DBDATETIME4 *d2)
RETCODE | dbdate4zero (DBPROCESS *dbprocess, DBDATETIME4 *d1)
RETCODE | dbdatechar (DBPROCESS *dbprocess, char *buf, int datepart, int value)
RETCODE | dbdatecmp (DBPROCESS *dbproc, DBDATETIME *d1, DBDATETIME *d2)
| Compare DBDATETIME values, similar to strcmp(3).
RETCODE | dbdatecrack (DBPROCESS *dbproc, DBDATEREC *di, DBDATETIME *dt)
| Break a DBDATETIME value into useful pieces.
int | dbdatename (DBPROCESS *dbprocess, char *buf, int date, DBDATETIME *datetime)
DBINT | dbdatepart (DBPROCESS *dbprocess, int datepart, DBDATETIME *datetime)
RETCODE | dbdatezero (DBPROCESS *dbprocess, DBDATETIME *d1)
DBINT | dbdatlen (DBPROCESS *dbproc, int column)
| Get size of current row's data in a regular result column.
char * | dbdayname (DBPROCESS *dbprocess, char *language, int daynum)
DBBOOL | dbdead (DBPROCESS *dbproc)
| For internal use only.
EHANDLEFUNC | dberrhandle (EHANDLEFUNC handler)
| Set an error handler, for messages from db-lib.
void | dbexit (void)
| Close server connections and free all related structures.
RETCODE | dbfcmd (DBPROCESS *dbproc, const char *fmt,...)
| `printf-like` way to form SQL to send to the server.
DBINT | dbfirstrow (DBPROCESS *dbproc)
| For internal use only.
RETCODE | dbfree_xlate (DBPROCESS *dbprocess, DBXLATE *xlt_tosrv, DBXLATE *clt_todisp)
void | dbfreebuf (DBPROCESS *dbproc)
| Erase the command buffer, in case `DBNOAUTOFREE` was set with dbsetopt().
void | dbfreequal (char *qualptr)
RETCODE | dbfreesort (DBPROCESS *dbprocess, DBSORTORDER *sortorder)
char * | dbgetchar (DBPROCESS *dbprocess, int n)
| Get address of a position in the command buffer.
char * | dbgetcharset (DBPROCESS *dbprocess)
RETCODE | dbgetloginfo (DBPROCESS *dbprocess, DBLOGINFO **loginfo)
int | dbgetlusername (LOGINREC *login, BYTE *name_buffer, int buffer_len)
int | dbgetmaxprocs (void)
| get maximum simultaneous connections db-lib will open to the server.
char * | dbgetnatlanf (DBPROCESS *dbprocess)
int | dbgetoff (DBPROCESS *dbprocess, DBUSMALLINT offtype, int startfrom)
int | dbgetpacket (DBPROCESS *dbproc)
| Get TDS packet size for the connection.
RETCODE | dbgetrow (DBPROCESS *dbproc, DBINT row)
| Read a row from the row buffer.
int | dbgettime (void)
| Get maximum seconds db-lib waits for a server response to query.
BYTE * | dbgetuserdata (DBPROCESS *dbproc)
| Get address of user-allocated data from a `DBPROCESS`.
DBBOOL | dbhasretstat (DBPROCESS *dbproc)
| Determine if query generated a return status number.
RETCODE | dbinit (void)
| Initialize db-lib.
int | dbiordesc (DBPROCESS *dbproc)
| For internal use only.
int | dbiowdesc (DBPROCESS *dbproc)
| For internal use only.
DBBOOL | dbisavail (DBPROCESS *dbprocess)
DBBOOL | dbisopt (DBPROCESS *dbproc, int option, char *param)
| Get value of an option.
DBINT | dblastrow (DBPROCESS *dbproc)
| For internal use only.
RETCODE | dbload_xlate (DBPROCESS *dbprocess, char *srv_charset, char *clt_name, DBXLATE **xlt_tosrv, DBXLATE **xlt_todisp)
DBSORTORDER * | dbloadsort (DBPROCESS *dbprocess)
LOGINREC * | dblogin (void)
| Allocate a `LOGINREC` structure.
void | dbloginfree (LOGINREC *login)
| free the `LOGINREC`
RETCODE | dbmny4add (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *sum)
| Add two DBMONEY4 values.
int | dbmny4cmp (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2)
| Compare two DBMONEY4 values.
RETCODE | dbmny4copy (DBPROCESS *dbprocess, DBMONEY4 *m1, DBMONEY4 *m2)
| Copy a DBMONEY4 value.
RETCODE | dbmny4divide (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *quotient)
| Divide two DBMONEY4 values.
RETCODE | dbmny4minus (DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest)
| Negate a DBMONEY4 value.
RETCODE | dbmny4mul (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *prod)
| Multiply two DBMONEY4 values.
RETCODE | dbmny4sub (DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *diff)
| Subtract two DBMONEY4 values.
RETCODE | dbmny4zero (DBPROCESS *dbproc, DBMONEY4 *dest)
| Zero a DBMONEY4 value.
RETCODE | dbmnyadd (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *sum)
| Add two DBMONEY values.
int | dbmnycmp (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2)
| Compare two DBMONEY values.
RETCODE | dbmnycopy (DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
| Copy a DBMONEY value.
RETCODE | dbmnydec (DBPROCESS *dbproc, DBMONEY *mnyptr)
| Subtract $0.0001 from a DBMONEY value.
RETCODE | dbmnydigit (DBPROCESS *dbprocess, DBMONEY *m1, DBCHAR *value, DBBOOL *zero)
RETCODE | dbmnydivide (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *quotient)
| Divide two DBMONEY values.
RETCODE | dbmnydown (DBPROCESS *dbproc, DBMONEY *mnyptr, int divisor, int *remainder)
| Divide a DBMONEY value by a positive integer.
RETCODE | dbmnyinc (DBPROCESS *dbproc, DBMONEY *mnyptr)
| Add $0.0001 to a DBMONEY value.
RETCODE | dbmnyinit (DBPROCESS *dbproc, DBMONEY *mnyptr, int trim, DBBOOL *negative)
| Prepare a DBMONEY value for use with dbmnyndigit().
RETCODE | dbmnymaxneg (DBPROCESS *dbproc, DBMONEY *dest)
| Get maximum negative DBMONEY value supported.
RETCODE | dbmnymaxpos (DBPROCESS *dbproc, DBMONEY *dest)
| Get maximum positive DBMONEY value supported.
RETCODE | dbmnyminus (DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
| Negate a DBMONEY value.
RETCODE | dbmnymul (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *prod)
| Multiply two DBMONEY values.
RETCODE | dbmnyndigit (DBPROCESS *dbproc, DBMONEY *mnyptr, DBCHAR *value, DBBOOL *zero)
| Get the least significant digit of a DBMONEY value, represented as a character.
RETCODE | dbmnyscale (DBPROCESS *dbproc, DBMONEY *dest, int multiplier, int addend)
| Multiply a DBMONEY value by a positive integer, and add an amount.
RETCODE | dbmnysub (DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2, DBMONEY *diff)
| Subtract two DBMONEY values.
RETCODE | dbmnyzero (DBPROCESS *dbproc, DBMONEY *dest)
| Set a DBMONEY value to zero.
const char * | dbmonthname (DBPROCESS *dbproc, char *language, int monthnum, DBBOOL shortform)
| Get name of a month, in some human language.
RETCODE | dbmorecmds (DBPROCESS *dbproc)
| See if more commands are to be processed.
RETCODE | dbmoretext (DBPROCESS *dbproc, DBINT size, BYTE *text)
| Send chunk of a text/image value to the server.
MHANDLEFUNC | dbmsghandle (MHANDLEFUNC handler)
| Set a message handler, for messages from the server.
char * | dbname (DBPROCESS *dbproc)
| Get name of current database.
RETCODE | dbnextrow (DBPROCESS *dbproc)
| Read result row into the row buffer and into any bound host variables.
RETCODE | dbnpcreate (DBPROCESS *dbprocess)
RETCODE | dbnpdefine (DBPROCESS *dbprocess, DBCHAR *procedure_name, DBSMALLINT namelen)
RETCODE | dbnullbind (DBPROCESS *dbproc, int column, DBINT *indicator)
| Tie a null-indicator to a regular result column.
int | dbnumalts (DBPROCESS *dbproc, int computeid)
| Get count of columns in a compute row.
int | dbnumcols (DBPROCESS *dbproc)
| Return number of regular columns in a result set.
int | dbnumcompute (DBPROCESS *dbprocess)
| Get count of `COMPUTE` clauses for a result set.
int | DBNUMORDERS (DBPROCESS *dbprocess)
int | dbnumrets (DBPROCESS *dbproc)
| Get count of output parameters filled by a stored procedure.
DBPROCESS * | dbopen (LOGINREC *login, const char *server)
int | dbordercol (DBPROCESS *dbprocess, int order)
RETCODE | dbpoll (DBPROCESS *dbproc, long milliseconds, DBPROCESS **ready_dbproc, int *return_reason)
| See if a server response has arrived.
void | dbprhead (DBPROCESS *dbproc)
| Print result set headings to stdout.
RETCODE | dbprrow (DBPROCESS *dbproc)
| Print a result set to stdout.
const char * | dbprtype (int token)
| Print a token value's name to a buffer.
char * | dbqual (DBPROCESS *dbprocess, int tabnum, char *tabname)
DBINT | dbreadpage (DBPROCESS *dbprocess, char *p_dbname, DBINT pageno, BYTE *buf)
STATUS | dbreadtext (DBPROCESS *dbproc, void *buf, DBINT bufsize)
| Fetch part of a text or image value from the server.
void | dbrecftos (char *filename)
| Record to a file all SQL commands sent to the server.
RETCODE | dbrecvpassthru (DBPROCESS *dbprocess, DBVOIDPTR *bufp)
RETCODE | dbregdrop (DBPROCESS *dbprocess, DBCHAR *procnm, DBSMALLINT namelen)
RETCODE | dbregexec (DBPROCESS *dbproc, DBUSMALLINT options)
| Execute a registered procedure.
RETCODE | dbreghandle (DBPROCESS *dbprocess, DBCHAR *procnm, DBSMALLINT namelen, INTFUNCPTR handler)
RETCODE | dbreginit (DBPROCESS *dbproc, DBCHAR *procedure_name, DBSMALLINT namelen)
| Ready execution of a registered procedure.
RETCODE | dbreglist (DBPROCESS *dbproc)
| Get names of Open Server registered procedures.
RETCODE | dbregnowatch (DBPROCESS *dbprocess, DBCHAR *procnm, DBSMALLINT namelen)
RETCODE | dbregparam (DBPROCESS *dbproc, char *param_name, int type, DBINT datalen, BYTE *data)
| Describe parameter of registered procedure .
RETCODE | dbregwatch (DBPROCESS *dbprocess, DBCHAR *procnm, DBSMALLINT namelen, DBUSMALLINT options)
RETCODE | dbregwatchlist (DBPROCESS *dbprocess)
RETCODE | dbresults (DBPROCESS *dbproc)
| Set up query results.
RETCODE | dbresults_r (DBPROCESS *dbproc, int recursive)
BYTE * | dbretdata (DBPROCESS *dbproc, int retnum)
| Get value of an output parameter filled by a stored procedure.
int | dbretlen (DBPROCESS *dbproc, int retnum)
| Get size of an output parameter filled by a stored procedure.
char * | dbretname (DBPROCESS *dbproc, int retnum)
| Get name of an output parameter filled by a stored procedure.
DBINT | dbretstatus (DBPROCESS *dbproc)
| Fetch status value returned by query or remote procedure call.
int | dbrettype (DBPROCESS *dbproc, int retnum)
| Get datatype of a stored procedure's return parameter.
RETCODE | dbrows (DBPROCESS *dbproc)
| For internal use only.
STATUS | dbrowtype (DBPROCESS *dbprocess)
| For internal use only.
RETCODE | dbrpcinit (DBPROCESS *dbproc, char *rpcname, DBSMALLINT options)
| Initialize a remote procedure call.
RETCODE | dbrpcparam (DBPROCESS *dbproc, char *paramname, BYTE status, int type, DBINT maxlen, DBINT datalen, BYTE *value)
| Add a parameter to a remote procedure call.
RETCODE | dbrpcsend (DBPROCESS *dbproc)
| Execute the procedure and free associated memory.
void | dbrpwclr (LOGINREC *login)
| Clear remote passwords from the LOGINREC structure.
RETCODE | dbrpwset (LOGINREC *login, char *srvname, char *password, int pwlen)
| Add a remote password to the LOGINREC structure.
RETCODE | dbsafestr (DBPROCESS *dbproc, const char *src, DBINT srclen, char *dest, DBINT destlen, int quotetype)
| safely quotes character values in SQL text.
RETCODE * | dbsechandle (DBINT type, INTFUNCPTR handler)
RETCODE | dbsendpassthru (DBPROCESS *dbprocess, DBVOIDPTR bufp)
char * | dbservcharset (DBPROCESS *dbprocess)
| Get `syscharset` name of the server character set.
void | dbsetavail (DBPROCESS *dbprocess)
| For internal use only.
void | dbsetbusy (DBPROCESS *dbprocess, DB_DBBUSY_FUNC busyfunc)
RETCODE | dbsetdefcharset (char *charset)
| Set the default character set.
RETCODE | dbsetdeflang (char *language)
| Set the default character set for an application.
void | dbsetidle (DBPROCESS *dbprocess, DB_DBIDLE_FUNC idlefunc)
void | dbsetifile (char *filename)
| set name and location of the `interfaces` file FreeTDS should use to look up a servername.
void | dbsetinterrupt (DBPROCESS *dbproc, DB_DBCHKINTR_FUNC chkintr, DB_DBHNDLINTR_FUNC hndlintr)
| Set interrupt handler for db-lib to use while blocked against a read from the server.
RETCODE | dbsetlbool (LOGINREC *login, int value, int which)
| For internal use only.
RETCODE | dbsetllong (LOGINREC *login, long value, int which)
| For internal use only.
RETCODE | dbsetlname (LOGINREC *login, const char *value, int which)
| For internal use only.
RETCODE | dbsetloginfo (LOGINREC *loginrec, DBLOGINFO *loginfo)
RETCODE | dbsetlogintime (int seconds)
| Set maximum seconds db-lib waits for a server response to a login attempt.
RETCODE | dbsetlshort (LOGINREC *login, int value, int which)
| For internal use only.
RETCODE | dbsetlversion (LOGINREC *login, BYTE version)
| Set TDS version for future connections.
RETCODE | dbsetmaxprocs (int maxprocs)
| Set maximum simultaneous connections db-lib will open to the server.
RETCODE | dbsetnull (DBPROCESS *dbprocess, int bindtype, int bindlen, BYTE *bindval)
| Define substitution values to be used when binding null values.
RETCODE | dbsetopt (DBPROCESS *dbproc, int option, const char *char_param, int int_param)
| Set db-lib or server option.
STATUS | dbsetrow (DBPROCESS *dbprocess, DBINT row)
| Make a buffered row "current" without fetching it into bound variables.
RETCODE | dbsettime (int seconds)
| Set maximum seconds db-lib waits for a server response to query.
void | dbsetuserdata (DBPROCESS *dbproc, BYTE *ptr)
| Associate client-allocated (and defined) data with a `DBPROCESS`.
RETCODE | dbsetversion (DBINT version)
| Specify a db-lib version level.
int | dbspid (DBPROCESS *dbproc)
| Get server process ID for a `DBPROCESS`.
RETCODE | dbspr1row (DBPROCESS *dbproc, char *buffer, DBINT buf_len)
| Print a regular result row to a buffer.
DBINT | dbspr1rowlen (DBPROCESS *dbproc)
| Determine size buffer required to hold the results returned by dbsprhead(), dbsprline(), and dbspr1row().
RETCODE | dbsprhead (DBPROCESS *dbproc, char *buffer, DBINT buf_len)
| Print result set headings to a buffer.
RETCODE | dbsprline (DBPROCESS *dbproc, char *buffer, DBINT buf_len, DBCHAR line_char)
| Get formatted string for underlining dbsprhead() column names.
RETCODE | dbsqlexec (DBPROCESS *dbproc)
| send the SQL command to the server and wait for an answer.
RETCODE | dbsqlok (DBPROCESS *dbproc)
| Wait for results of a query from the server.
RETCODE | dbsqlsend (DBPROCESS *dbproc)
| Transmit the command buffer to the server.
int | dbstrbuild (DBPROCESS *dbproc, char *charbuf, int bufsize, char *text, char *formats,...)
| Build a printable string from text containing placeholders for variables.
int | dbstrcmp (DBPROCESS *dbprocess, char *s1, int l1, char *s2, int l2, DBSORTORDER *sort)
RETCODE | dbstrcpy (DBPROCESS *dbproc, int start, int numbytes, char *dest)
| Get a copy of a chunk of the command buffer.
int | dbstrlen (DBPROCESS *dbproc)
| Get size of the command buffer, in bytes.
int | dbstrsort (DBPROCESS *dbprocess, char *s1, int l1, char *s2, int l2, DBSORTORDER *sort)
DBBOOL | dbtabbrowse (DBPROCESS *dbprocess, int tabnum)
int | dbtabcount (DBPROCESS *dbprocess)
RETCODE | dbtablecolinfo (DBPROCESS *dbproc, DBINT column, DBCOL *pdbcol)
| describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo)
char * | dbtabname (DBPROCESS *dbprocess, int tabnum)
char * | dbtabsoruce (DBPROCESS *dbprocess, int colnum, int *tabnum)
int | dbtds (DBPROCESS *dbprocess)
| For internal use only.
DBINT | dbtextsize (DBPROCESS *dbprocess)
int | dbtsnewlen (DBPROCESS *dbprocess)
DBBINARY * | dbtsnewval (DBPROCESS *dbprocess)
RETCODE | dbtsput (DBPROCESS *dbprocess, DBBINARY *newts, int newtslen, int tabnum, char *tabname)
DBBINARY * | dbtxptr (DBPROCESS *dbproc, int column)
| Get text pointer for a column in the current row.
DBBINARY * | dbtxtimestamp (DBPROCESS *dbproc, int column)
| Get text timestamp for a column in the current row.
DBBINARY * | dbtxtsnewval (DBPROCESS *dbprocess)
RETCODE | dbtxtsput (DBPROCESS *dbprocess, DBBINARY newtxts, int colnum)
RETCODE | dbuse (DBPROCESS *dbproc, const char *name)
| Change current database.
DBINT | dbvarylen (DBPROCESS *dbproc, int column)
| Determine whether a column can vary in size.
const char * | dbversion (void)
| See which version of db-lib is in use.
DBBOOL | dbwillconvert (int srctype, int desttype)
| Test whether or not a datatype can be converted to another datatype.
RETCODE | dbwritepage (DBPROCESS *dbprocess, char *p_dbname, DBINT pageno, DBINT size, BYTE *buf)
RETCODE | dbwritetext (DBPROCESS *dbproc, char *objname, DBBINARY *textptr, DBTINYINT textptrlen, DBBINARY *timestamp, DBBOOL log, DBINT size, BYTE *text)
| Send text or image data to the server.
int | dbxlate (DBPROCESS *dbprocess, char *src, int srclen, char *dest, int destlen, DBXLATE *xlt, int *srcbytes_used, DBBOOL srcend, int status)
DBBOOL | DRBUF (DBPROCESS *dbprocess)
DBPROCESS * | open_commit (LOGINREC *login, char *servername)
RETCODE | remove_xact (DBPROCESS *connect, DBINT commid, int n)
RETCODE | scan_xact (DBPROCESS *connect, DBINT commid)
DBINT | start_xact (DBPROCESS *connect, char *application_name, char *xact_name, int site_count)
DBINT | stat_xact (DBPROCESS *connect, DBINT commid)
DBPROCESS * | tdsdbopen (LOGINREC *login, const char *server, int msdblib)
| For internal use only.
## Variables
static const void *const | no_unused_sybdb_h_warn [] = { rcsid_sybdb_h, no_unused_sybdb_h_warn }
static const char | rcsid_sybdb_h [] = "$Id: sybdb.h,v 1.85 2007/12/02 23:01:37 jklowden Exp $"

## Detailed Description

Primary include file for db-lib applications.

Declares macros, functions, enumerated types, and defined tokens used by the db-lib API.

## Function Documentation

RETCODE dbcolinfo | ( | DBPROCESS * | dbproc,
|  | CI_TYPE | type,
|  | DBINT | column,
|  | DBINT | computeid,
|  | DBCOL * | pdbcol |
| ) |  |  |

Get a bunch of column attributes with a single call (Microsoft-compatibility feature).

Parameters:

  | dbproc | contains all information needed by db-lib to manage communications with the server.
  | type | must be CI_REGULAR or CI_ALTERNATE (CI_CURSOR is defined by the vendor, but is not yet implemented).
  | column | Nth in the result set, starting from 1.
  | computeid | (ignored)
  | pdbcol | address of structure to be populated by this function.

Returns:
  SUCCEED or FAIL.

See also:
  dbcolbrowse(), dbqual(), dbtabbrowse(), dbtabcount(), dbtabname(), dbtabsource(), dbtsnewlen(), dbtsnewval(), dbtsput().

Todo:
  Support cursor rows.