FreeTDS API

error_table.h
1 { SYBEICONVI, EXINFO, "WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?')."},
2 { SYBEICONVO, EXUSER, "Error converting client characters into server's character set. Some character(s) could not be converted."},
3 { SYBEAAMT, EXPROGRAM, "User attempted a dbaltbind() with mismatched column and variable types."},
4 { SYBEABMT, EXPROGRAM, "User attempted a dbbind() with mismatched column and variable types."},
5 { SYBEABNC, EXPROGRAM, "Attempt to bind to a non-existent column."},
6 { SYBEABNP, EXPROGRAM, "Attempt to bind using NULL pointers."},
7 { SYBEABNV, EXPROGRAM, "Attempt to bind to a NULL program variable."},
8 { SYBEACNV, EXCONVERSION, "Attemp to do conversion with NULL destination variable."},
9 { SYBEADST, EXCONSISTENCY, "Error in attempting to determine the size of a pair of translation tables."},
10 { SYBEAICF, EXCONSISTENCY, "Error in attempting to install custom format."},
11 { SYBEALTT, EXCONSISTENCY, "Error in attempting to load a pair of translation tables."},
12 { SYBEAOLF, EXRESOURCE, "Error in attempting to open a localization file."},
13 { SYBEAPCT, EXCONSISTENCY, "Error in attempting to perform a character-set translation."},
14 { SYBEAPUT, EXPROGRAM, "Attempt to print unknown token."},
15 { SYBEARDI, EXRESOURCE, "Error in attempting to read datetime information from a localization file."},
16 { SYBEARDL, EXRESOURCE, "Error in attempting to read the dblib.loc localization file."},
17 { SYBEASEC, EXPROGRAM, "Attempt to send an empty command buffer to the SQL Server."},
18 { SYBEASNL, EXPROGRAM, "Attempt to set fields in a null loginrec."},
19 { SYBEASTF, 1, "VMS: Unable to setmode for control_c ast."},
20 { SYBEASTL, EXPROGRAM, "Synchronous IO attempted at AST level."},
21 { SYBEASUL, EXPROGRAM, "Attempt to set unknown loginrec field."},
22 { SYBEATTNACK, 1, "Timed out waiting for server to acknowledge attention."},
23 { SYBEAUTN, EXPROGRAM, "Attempt to update the timestamp of a table which has no timestamp column."},
24 { SYBEBADPK, EXINFO, "Packet size of %1! not supported. -- size of %2! used instead."},
25 { SYBEBADTYPE, 1, "Illegal value for type parameter given to %1!."},
26 { SYBEBBCI, EXINFO, "Batch successfully bulk-copied to SQL Server."},
27 { SYBEBBFL, 1, "-001- Batch failed in bulk-copy to SQL Server."},
28 { SYBEBBL, EXPROGRAM, "Bad bindlen parameter passed to dbsetnull()."},
29 { SYBEBCBC, EXPROGRAM, "bcp_columns() must be called before bcp_colfmt() and bcp_colfmt_ps()."},
30 { SYBEBCBNPR, EXPROGRAM, "bcp_bind(): if varaddr is NULL, prefixlen must be 0 and no terminator should be specified."},
31 { SYBEBCBNTYP, EXPROGRAM, "bcp_bind(): if varaddr is NULL and varlen greater than 0, the table column type must be SYBTEXT or SYBIMAGE and the program variable type must be SYBTEXT, SYBCHAR, SYBIMAGE or SYBBINARY."},
32 { SYBEBCBPREF, EXPROGRAM, "Illegal prefix length. Legal values are 0, 1, 2 or 4."},
33 { SYBEBCFO, EXUSER, "Bcp host-files must contain at least one column."},
34 { SYBEBCHLEN, EXPROGRAM, "host_collen should be greater than or equal to -1."},
35 { SYBEBCIS, EXCONSISTENCY, "Attempt to bulk-copy an illegally-sized column value to the SQL Server."},
36 { SYBEBCIT, EXPROGRAM, "It's illegal to use BCP terminators with program variables other than SYBCHAR, SYBBINARY, SYBTEXT, or SYBIMAGE."},
37 { SYBEBCITBLEN, EXPROGRAM, "bcp_init(): tblname parameter is too long."},
38 { SYBEBCITBNM, EXPROGRAM, "bcp_init(): tblname parameter cannot be NULL."},
39 { SYBEBCMTXT, EXPROGRAM, "bcp_moretext() may be used only when there is at least one text or image column in the server table."},
40 { SYBEBCNL, EXNONFATAL, "Negative length-prefix found in BCP data-file."},
41 { SYBEBCNN, EXUSER, "Attempt to bulk-copy a NULL value into Server column 0, which does not accept NULL values."},
42 { SYBEBCNT, EXUSER, "Attempt to use Bulk Copy with a non-existent Server table."},
43 { SYBEBCOR, EXCONSISTENCY, "Attempt to bulk-copy an oversized row to the SQL Server."},
44 { SYBEBCPB, EXPROGRAM, "bcp_bind(), bcp_moretext() and bcp_sendrow() may NOT be used after bcp_init() has been passed a non-NULL input file name."},
45 { SYBEBCPCTYP, EXPROGRAM, "bcp_colfmt(): If table_colnum is 0, host_type cannot be 0."},
46 { SYBEBCPI, EXPROGRAM, "bcp_init() must be called before any other bcp routines."},
47 { SYBEBCPN, EXPROGRAM, "bcp_bind(), bcp_collen(), bcp_colptr(), bcp_moretext() and bcp_sendrow() may be used only after bcp_init() has been called with the copy direction set to DB_IN."},
48 { SYBEBCPOPT, 1, "The option cannot be called while a bulk copy operation is progress."},
49 { SYBEBCPREC, EXNONFATAL, "Column %1!: Illegal precision value encountered."},
50 { SYBEBCPREF, EXPROGRAM, "Illegal prefix length. Legal values are -1, 0, 1, 2 or 4."},
51 { SYBEBCRE, EXNONFATAL, "IO error while reading bcp data-file."},
52 { SYBEBCRO, EXINFO, "The BCP hostfile '' contains only 0 rows. It was impossible to read the requested 0 rows."},
53 { SYBEBCSA, EXUSER, "The BCP hostfile '' contains only 0 rows. Skipping all of these rows is not allowed."},
54 { SYBEBCSET, EXCONSISTENCY, "Unknown character-set encountered."},
55 { SYBEBCSI, EXPROGRAM, "Host-file columns may be skipped only when copying INto the Server."},
56 { SYBEBCSNDROW, EXPROGRAM, "bcp_sendrow() may NOT be called unless all text data for the previous row has been sent using bcp_moretext()."},
57 { SYBEBCSNTYP, EXPROGRAM, "column number %1!: if varaddr is NULL and varlen greater than 0, the table column type must be SYBTEXT or SYBIMAGE and the program variable type must be SYBTEXT, SYBCHAR, SYBIMAGE or SYBBINARY."},
58 { SYBEBCUC, EXRESOURCE, "Bcp: Unable to close host data-file."},
59 { SYBEBCUO, EXRESOURCE, "Bcp: Unable to open host data-file."},
60 { SYBEBCVH, EXPROGRAM, "bcp_exec() may be called only after bcp_init() has been passed a valid host file."},
61 { SYBEBCVLEN, EXPROGRAM, "varlen should be greater than or equal to -1."},
62 { SYBEBCWE, EXNONFATAL, "IO error while writing bcp data-file."},
63 { SYBEBDIO, EXPROGRAM, "Bad bulk-copy direction. Must be either IN or OUT."},
64 { SYBEBEOF, EXNONFATAL, "Unexpected EOF encountered in BCP data-file."},
65 { SYBEBIHC, EXPROGRAM, "Incorrect host-column number found in bcp format-file."},
66 { SYBEBIVI, EXPROGRAM, "bcp_columns(), bcp_colfmt() and bcp_colfmt_ps() may be used only after bcp_init() has been passed a valid input file."},
67 { SYBEBNCR, EXPROGRAM, "Attempt to bind user variable to a non-existent compute row."},
68 { SYBEBNUM, EXPROGRAM, "Bad numbytes parameter passed to dbstrcpy()."},
69 { SYBEBOOL, 1, "Boolean parameters must be TRUE or FALSE."},
70 { SYBEBPKS, EXPROGRAM, "In DBSETLPACKET(), the packet size parameter must be between 0 and 999999."},
71 { SYBEBPREC, EXPROGRAM, "Illegal precision specified."},
72 { SYBEBPROBADDEF, EXCONSISTENCY, "bcp protocol error: illegal default column id received."},
73 { SYBEBPROBADLEN, 1, "bcp protocol error: illegal datatype length received."},
74 { SYBEBPROBADPREC, 1, "bcp protocol error: illegal precision value received."},
75 { SYBEBPROBADSCL, 1, "bcp protocol error: illegal scale value received."},
76 { SYBEBPROBADTYP, 1, "bcp protocol error: unknown column datatype."},
77 { SYBEBPROCOL, EXCONSISTENCY, "bcp protocol error: returned column count differs from the actual number of columns received."},
78 { SYBEBPRODEF, EXCONSISTENCY, "bcp protocol error: expected default information and got none."},
79 { SYBEBPRODEFID, EXCONSISTENCY, "bcp protocol error: default column id and actual column id are not same."},
80 { SYBEBPRODEFTYP, EXCONSISTENCY, "bcp protocol error: default value datatype differs from column datatype."},
81 { SYBEBPROEXTDEF, EXCONSISTENCY, "bcp protocol error: more than one row of default information received."},
82 { SYBEBPROEXTRES, EXCONSISTENCY, "bcp protocol error: unexpected set of results received."},
83 { SYBEBPRONODEF, EXCONSISTENCY, "bcp protocol error: default value received for column that does not have default."},
84 { SYBEBPRONUMDEF, EXCONSISTENCY, "bcp protocol error: expected number of defaults differs from the actual number of defaults received."},
85 { SYBEBRFF, EXRESOURCE, "IO error while reading bcp format-file."},
86 { SYBEBSCALE, EXPROGRAM, "Illegal scale specified."},
87 { SYBEBTMT, EXPROGRAM, "Attempt to send too much TEXT data via the bcp_moretext() call."},
88 { SYBEBTOK, EXCOMM, "Bad token from SQL Server: Data-stream processing out of sync."},
89 { SYBEBTYP, EXPROGRAM, "Unknown bind type passed to DB-LIBRARY function."},
90 { SYBEBTYPSRV, EXPROGRAM, "Datatype is not supported by the server."},
91 { SYBEBUCE, EXRESOURCE, "Bcp: Unable to close error-file."},
92 { SYBEBUCF, EXPROGRAM, "Bcp: Unable to close format-file."},
93 { SYBEBUDF, EXPROGRAM, "Bcp: Unrecognized datatype found in format-file."},
94 { SYBEBUFF, EXPROGRAM, "Bcp: Unable to create format-file."},
95 { SYBEBUFL, EXCONSISTENCY, "DB-LIBRARY internal error - send buffer length corrupted."},
96 { SYBEBUOE, EXRESOURCE, "Bcp: Unable to open error-file."},
97 { SYBEBUOF, EXPROGRAM, "Bcp: Unable to open format-file."},
98 { SYBEBWEF, EXNONFATAL, "IO error while writing bcp error-file."},
99 { SYBEBWFF, EXRESOURCE, "IO error while writing bcp format-file."},
100 { SYBECAP, EXCOMM, "DB-Library capabilities not accepted by the Server."},
101 { SYBECAPTYP, EXCOMM, "Unexpected capability type in CAPABILITY datastream."},
102 { SYBECDNS, EXCONSISTENCY, "Datastream indicates that a compute column is derived from a non-existent select-list member."},
103 { SYBECDOMAIN, EXCONVERSION, "Source field value is not within the domain of legal values."},
104 { SYBECINTERNAL, EXCONVERSION, "Internal Conversion error."},
105 { SYBECLOS, EXCOMM, "Error in closing network connection."},
106 { SYBECLOSEIN, 1, "Unable to close interface file."},
107 { SYBECLPR, EXCONVERSION, "Data-conversion resulted in loss of precision."},
108 { SYBECNOR, EXPROGRAM, "Column number out of range."},
109 { SYBECNOV, EXCONVERSION, "Attempt to set variable to NULL resulted in overflow."},
110 { SYBECOFL, EXCONVERSION, "Data-conversion resulted in overflow."},
111 { SYBECONN, EXCOMM, "Unable to connect socket -- SQL Server is unavailable or does not exist."},
112 { SYBECRNC, EXPROGRAM, "The current row is not a result of compute clause 0, so it is illegal to attempt to extract that data from this row."},
113 { SYBECRSAGR, EXPROGRAM, "Aggregate functions are not allowed in a cursor statement."},
114 { SYBECRSBROL, EXPROGRAM, "Backward scrolling cannot be used in a forward scrolling cursor."},
115 { SYBECRSBSKEY, EXPROGRAM, "Keyset cannot be scrolled backward in mixed cursors with a previous fetch type."},
116 { SYBECRSBUFR, EXPROGRAM, "Row buffering should not be turned on when using cursor APIs."},
117 { SYBECRSDIS, EXPROGRAM, "Cursor statement contains one of the disallowed phrases 'compute', 'union', 'for browse', or 'select into'."},
118 { SYBECRSFLAST, EXPROGRAM, "Fetch type LAST requires fully keyset driven cursors."},
119 { SYBECRSFRAND, EXPROGRAM, "Fetch types RANDOM and RELATIVE can only be used within the keyset of keyset driven cursors."},
120 { SYBECRSFROWN, EXPROGRAM, "Row number to be fetched is outside valid range."},
121 { SYBECRSFTYPE, EXRESOURCE, "Unknown fetch type."},
122 { SYBECRSINV, EXPROGRAM, "Invalid cursor statement."},
123 { SYBECRSINVALID, EXRESOURCE, "The cursor handle is invalid."},
124 { SYBECRSMROWS, EXRESOURCE, "Multiple rows are returned, only one is expected."},
125 { SYBECRSNOBIND, EXPROGRAM, "Cursor bind must be called prior to updating cursor."},
126 { SYBECRSNOCOUNT, EXPROGRAM, "The DBNOCOUNT option should not be turned on when doing updates or deletes with dbcursor()."},
127 { SYBECRSNOFREE, EXPROGRAM, "The DBNOAUTOFREE option should not be turned on when using cursor APIs."},
128 { SYBECRSNOIND, EXPROGRAM, "One of the tables involved in the cursor statement does not have a unique index."},
129 { SYBECRSNOKEYS, EXRESOURCE, "The entire keyset must be defined for KEYSET cursors."},
130 { SYBECRSNOLEN, EXRESOURCE, "No unique index found."},
131 { SYBECRSNOPTCC, EXRESOURCE, "No OPTCC was found."},
132 { SYBECRSNORDER, EXRESOURCE, "The order of clauses must be from, where, and order by."},
133 { SYBECRSNORES, EXPROGRAM, "Cursor statement generated no results."},
134 { SYBECRSNOTABLE, EXRESOURCE, "Table name is NULL."},
135 { SYBECRSNOUPD, EXPROGRAM, "Update or delete operation did not affect any rows."},
136 { SYBECRSNOWHERE, EXPROGRAM, "A WHERE clause is not allowed in a cursor update or insert."},
137 { SYBECRSNROWS, EXRESOURCE, "No rows returned, at least one is expected."},
138 { SYBECRSNUNIQUE, EXRESOURCE, "No unique keys associated with this view."},
139 { SYBECRSORD, EXPROGRAM, "Only fully keyset driven cursors can have 'order by', ' group by', or 'having' phrases."},
140 { SYBECRSRO, EXPROGRAM, "Data locking or modifications cannot be made in a READONLY cursor."},
141 { SYBECRSSET, EXPROGRAM, "A SET clause is required for a cursor update or insert."},
142 { SYBECRSTAB, EXPROGRAM, "Table name must be determined in operations involving data locking or modifications."},
143 { SYBECRSUPDNB, EXPROGRAM, "Update or insert operations cannot use bind variables when binding type is NOBIND."},
144 { SYBECRSUPDTAB, EXPROGRAM, "Update or insert operations using bind variables require single table cursors."},
145 { SYBECRSVAR, EXRESOURCE, "There is no valid address associated with this bind."},
146 { SYBECRSVIEW, EXPROGRAM, "A view cannot be joined with another table or a view in a cursor statement."},
147 { SYBECRSVIIND, EXPROGRAM, "The view used in the cursor statement does not include all the unique index columns of the underlying tables."},
148 { SYBECS, 1, "-004- cs context Error."},
149 { SYBECSYN, EXCONVERSION, "Attempt to convert data stopped by syntax error in source field."},
150 { SYBECUFL, EXCONVERSION, "Data-conversion resulted in underflow."},
151 { SYBECWLL, 1, "Attempt to set column width less than 1."},
152 { SYBEDBPS, EXRESOURCE, "Maximum number of DBPROCESSes already allocated."},
153 { SYBEDCL, 1, "-004- DCL Error."},
154 { SYBEDDNE, EXCOMM, "DBPROCESS is dead or not enabled."},
155 { SYBEDIVZ, EXUSER, "Attempt to divide by $0.00 in function %1!."},
156 { SYBEDNTI, EXPROGRAM, "Attempt to use dbtxtsput() to put a new text-timestamp into a column whose datatype is neither SYBTEXT nor SYBIMAGE."},
157 { SYBEDPOR, EXPROGRAM, "Out-of-range datepart constant."},
158 { SYBEDVOR, EXPROGRAM, "Day values must be between 1 and 7."},
159 { SYBEECAN, EXINFO, "Attempted to cancel unrequested event notification."},
160 { SYBEECRT, 1, "Must call dbregdefine() before dbregcreate()."},
161 { SYBEEINI, EXINFO, "Must call dbreginit() before dbregraise()."},
162 { SYBEEQVA, 1, "Error in queueing VMS AST routine."},
163 { SYBEERRLABEL, 1, "An illegal value was returned from the security label handler."},
164 { SYBEESSL, 1, "Login security level entered does not agree with operating system level."},
165 { SYBEETD, EXPROGRAM, "Failure to send the expected amount of TEXT or IMAGE data via dbmoretext()."},
166 { SYBEEUNR, EXCOMM, "Unsolicited event notification received."},
167 { SYBEEVOP, EXINFO, "Called dbregwatch() with a bad options parameter."},
168 { SYBEEVST, EXINFO, "Must initiate a transaction before calling dbregparam()."},
169 { SYBEFCON, EXCOMM, "SQL Server connection failed."},
170 { SYBEFENC, 1, "Password Encryption failed."},
171 { SYBEFGTL, 1, "Bcp: Row number of the first row to be copied cannot be greater than the row number for the last row to be copied."},
172 { SYBEFMODE, 1, "ReadWriteAppend mode denied on file."},
173 { SYBEFRES, EXFATAL, "Challenge-Response function failed."},
174 { SYBEFSHD, EXRESOURCE, "Error in attempting to find the Sybase home directory."},
175 { SYBEFUNC, EXPROGRAM, "Functionality not supported at the specified version level."},
176 { SYBEGENOS, 1, "General Operating System Error."},
177 { SYBEICN, EXPROGRAM, "Invalid computeid or compute column number."},
178 { SYBEIDCL, EXCONSISTENCY, "Illegal datetime column length returned by DataServer. Legal datetime lengths are 4 and 8 bytes."},
179 { SYBEIDECCL, EXCONSISTENCY, "Invalid decimal column length returned by the server."},
180 { SYBEIFCL, EXCONSISTENCY, "Illegal floating-point column length returned by DataServer. Legal floating-point lengths are 4 and 8 bytes."},
181 { SYBEIFNB, EXPROGRAM, "Illegal field number passed to bcp_control()."},
182 { SYBEIICL, EXCONSISTENCY, "Illegal integer column length returned by SQL Server. Legal integer lengths are 1, 2, and 4 bytes."},
183 { SYBEIMCL, EXCONSISTENCY, "Illegal money column length returned by DataServer. Legal money lengths are 4 and 8 bytes."},
184 { SYBEINLN, EXUSER, "Interface file: unexpected end-of-line."},
185 { SYBEINTF, EXUSER, "Server name not found in interface file."},
186 { SYBEINUMCL, EXCONSISTENCY, "Invalid numeric column length returned by the server."},
187 { SYBEIPV, EXINFO, "%1! is an illegal value for the %2! parameter of %3!."},
188 { SYBEISOI, EXCONSISTENCY, "Invalid sort-order information found."},
189 { SYBEISRVPREC, EXCONSISTENCY, "Illegal precision value returned by the server."},
190 { SYBEISRVSCL, EXCONSISTENCY, "Illegal scale value returned by the server."},
191 { SYBEITIM, EXPROGRAM, "Illegal timeout value specified."},
192 { SYBEIVERS, EXPROGRAM, "Illegal version level specified."},
193 { SYBEKBCI, EXINFO, "Bcp: 1000 rows sent to SQL Server."},
194 { SYBEKBCO, EXINFO, "1000 rows successfully bulk-copied to host-file."},
195 { SYBELBLEN, 1, "Security labels should be less than 256 characters long."},
196 { SYBEMEM, EXRESOURCE, "Unable to allocate sufficient memory."},
197 { SYBEMOV, EXUSER, "Money arithmetic resulted in overflow in function %1!."},
198 { SYBEMPLL, EXUSER, "Attempt to set maximum number of DBPROCESSes lower than 1."},
199 { SYBEMVOR, EXPROGRAM, "Month values must be between 1 and 12."},
200 { SYBENBUF, EXINFO, "called dbsendpassthru() with a NULL buf pointer."},
201 { SYBENBVP, EXPROGRAM, "Cannot pass dbsetnull() a NULL bindval pointer."},
202 { SYBENDC, EXPROGRAM, "Cannot have negative component in date in numeric form."},
203 { SYBENDTP, EXPROGRAM, "Called dbdatecrack() with a NULL datetime parameter."},
204 { SYBENEG, EXCOMM, "Negotiated login attempt failed."},
205 { SYBENEHA, 1, "Called dbreghandle() with a NULL handler parameter."},
206 { SYBENHAN, EXINFO, "called dbrecvpassthru() with a NULL handler parameter."},
207 { SYBENLNL, 1, "Program not linked with specified network library."},
208 { SYBENMOB, EXPROGRAM, "No such member of 'order by' clause."},
209 { SYBENOEV, EXINFO, "dbpoll() cannot be called if registered procedure notifications have been disabled."},
210 { SYBENOTI, 1, "No event handler installed."},
211 { SYBENOVALUE, 1, "Security labels require both a name and a value."},
212 { SYBENPRM, EXPROGRAM, "NULL parameter not allowed for this dboption."},
213 { SYBENSIP, EXPROGRAM, "Negative starting index passed to dbstrcpy()."},
214 { SYBENTLL, EXUSER, "Name too long for loginrec field."},
215 { SYBENTST, 1, "The file being opened must be a stream_lf."},
216 { SYBENTTN, EXPROGRAM, "Attempt to use dbtxtsput() to put a new text-timestamp into a non-existent data row."},
217 { SYBENULL, EXINFO, "NULL DBPROCESS pointer passed to DB-Library."},
218 { SYBENULP, EXPROGRAM, "Called with a NULL parameter."},
219 { SYBENUM, 1, "Incorrect number of arguments given to DB-Library."},
220 { SYBENXID, EXNONFATAL, "The Server did not grant us a distributed-transaction ID."},
221 { SYBEONCE, EXPROGRAM, "Function can be called only once."},
222 { SYBEOOB, EXCOMM, "Error in sending out-of-band data to SQL Server."},
223 { SYBEOPIN, EXNONFATAL, "Could not open interface file."},
224 { SYBEOPNA, EXNONFATAL, "The textimage facility is available only when using a SQL Server whose version number is 4.0 or greater."},
225 { SYBEOPTNO, 1, "Option is not allowed or is unreconized."},
226 { SYBEOREN, EXINFO, "Warning: an out-of-range error-number was encountered in dblib.loc. The maximum permissible error-number is defined as DBERRCOUNT in sybdb.h."},
227 { SYBEORPF, EXUSER, "Attempt to set remote password would overflow the login-record's remote-password field."},
228 { SYBEOSSL, 1, "Operating system login level not in range of Secure SQL Server."},
229 { SYBEPAGE, 1, "wrong resource type or length given for dbpage() operation."},
230 { SYBEPOLL, EXINFO, "Only one dbpoll() can be active at a time."},
231 { SYBEPRTF, EXINFO, "dbtracestring() may only be called from a printfunc()."},
232 { SYBEPWD, EXUSER, "Incorrect password."},
233 { SYBERDCN, EXCONVERSION, "Requested data-conversion does not exist."},
234 { SYBERDNR, EXPROGRAM, "Attempt to retrieve data from a non-existent row."},
235 { SYBEREAD, EXCOMM, "Read from SQL Server failed."},
236 { SYBERESP, EXPROGRAM, "Response function address passed to dbresponse() must be non-NULL."},
237 { SYBERFILE, 1, "Can not open resource file."},
238 { SYBERPCS, EXINFO, "Must call dbrpcinit() before dbrpcparam()."},
239 { SYBERPIL, EXPROGRAM, "It is illegal to pass -1 to dbrpcparam() for the datalen of parameters which are of type SYBCHAR, SYBVARCHAR, SYBBINARY, or SYBVARBINARY."},
240 { SYBERPNA, EXNONFATAL, "The RPC facility is available only when using a SQL Server whose version number is 4.0 or greater."},
241 { SYBERPND, EXPROGRAM, "Attempt to initiate a new SQL Server operation with results pending."},
242 { SYBERPNULL, EXPROGRAM, "value parameter for dbprcparam() can be NULL, only if the datalen parameter is 0."},
243 { SYBERPTXTIM, EXPROGRAM, "RPC parameters cannot be of type TextImage."},
244 { SYBERPUL, EXPROGRAM, "When passing a SYBINTN, SYBDATETIMN, SYBMONEYN, or SYBFLTN parameter via dbrpcparam(), it's necessary to specify the parameter's maximum or actual length, so that DB-Library can recognize it as a SYBINT1, SYBINT2, SYBINT4, SYBMONEY, or SYBMONEY4, etc."},
245 { SYBERTCC, EXPROGRAM, "dbreadtext() may not be used to receive the results of a query which contains a COMPUTE clause."},
246 { SYBERTSC, EXPROGRAM, "dbreadtext() may only be used to receive the results of a query which contains a single result column."},
247 { SYBERTYPE, 1, "Invalid resource type given to DB-Library."},
248 { SYBERXID, EXNONFATAL, "The Server did not recognize our distributed-transaction ID."},
249 { SYBESECURE, EXPROGRAM, "Secure Server function not supported in this version."},
250 { SYBESEFA, EXPROGRAM, "DBSETNOTIFS cannot be called if connections are present."},
251 { SYBESEOF, EXCOMM, "Unexpected EOF from SQL Server."},
252 { SYBESFOV, EXPROGRAM, "dbsafestr() overflowed its destination buffer."},
253 { SYBESLCT, 1, "Could not select or copy field specified."},
254 { SYBESMSG, EXSERVER, "General SQL Server error: Check messages from the SQL Server."},
255 { SYBESOCK, EXCOMM, "Unable to open socket."},
256 { SYBESPID, EXPROGRAM, "Called dbspid() with a NULL dbproc."},
257 { SYBESYNC, EXCOMM, "Read attempted while out of synchronization with SQL Server."},
258 { SYBETEXS, EXINFO, "Called dbmoretext() with a bad size parameter."},
259 { SYBETIME, EXTIME, "SQL Server connection timed out."},
260 { SYBETMCF, EXPROGRAM, "Attempt to install too many custom formats via dbfmtinstall()."},
261 { SYBETMTD, EXPROGRAM, "Attempt to send too much TEXT data via the dbmoretext() call."},
262 { SYBETPAR, EXPROGRAM, "No SYBTEXT or SYBIMAGE parameters were defined."},
263 { SYBETPTN, EXUSER, "Syntax error: only two periods are permitted in table names."},
264 { SYBETRAC, EXINFO, "Attempted to turn off a trace flag that was not on."},
265 { SYBETRAN, EXINFO, "DBPROCESS is being used for another transaction."},
266 { SYBETRAS, EXINFO, "DB-Library internal error - trace structure not found."},
267 { SYBETRSN, EXINFO, "Bad numbytes parameter passed to dbtracestring()."},
268 { SYBETSIT, EXINFO, "Attempt to call dbtsput() with an invalid timestamp."},
269 { SYBETTS, EXUSER, "The table which bulk-copy is attempting to copy to a host-file is shorter than the number of rows which bulk-copy was instructed to skip."},
270 { SYBETYPE, EXINFO, "Invalid argument type given to DB-Library."},
271 { SYBEUACS, 1, "VMS: Unable to assign channel to sys$command."},
272 { SYBEUAVE, 1, "Unable to allocate VMS event flag."},
273 { SYBEUCPT, EXUSER, "Unrecognized custom-format parameter-type encountered in dbstrbuild()."},
274 { SYBEUCRR, EXCONSISTENCY, "Internal software error: Unknown connection result reported by dbpasswd()."},
275 { SYBEUDTY, EXCONSISTENCY, "Unknown datatype encountered."},
276 { SYBEUFDS, EXUSER, "Unrecognized format encountered in dbstrbuild()."},
277 { SYBEUFDT, EXCONSISTENCY, "Unknown fixed-length datatype encountered."},
278 { SYBEUHST, EXUSER, "Unknown host machine name."},
279 { SYBEUMSG, EXCOMM, "Unknown message-id in MSG datastream."},
280 { SYBEUNAM, EXFATAL, "Unable to get current username from operating system."},
281 { SYBEUNOP, EXNONFATAL, "Unknown option passed to dbsetopt()."},
282 { SYBEUNT, EXUSER, "Unknown network type found in interface file."},
283 { SYBEURCI, EXRESOURCE, "Unable to read copyright information from the dblib localization file."},
284 { SYBEUREI, EXRESOURCE, "Unable to read error information from the dblib localization file."},
285 { SYBEUREM, EXRESOURCE, "Unable to read error mnemonic from the dblib localization file."},
286 { SYBEURES, EXRESOURCE, "Unable to read error string from the dblib localization file."},
287 { SYBEURMI, EXRESOURCE, "Unable to read money-format information from the dblib localization file."},
288 { SYBEUSCT, EXCOMM, "Unable to set communications timer."},
289 { SYBEUTDS, EXCOMM, "Unrecognized TDS version received from SQL Server."},
290 { SYBEUVBF, EXPROGRAM, "Attempt to read an unknown version of BCP format-file."},
291 { SYBEUVDT, EXCONSISTENCY, "Unknown variable-length datatype encountered."},
292 { SYBEVDPT, EXUSER, "For bulk copy, all variable-length data must have either a length-prefix or a terminator specified."},
293 { SYBEVMS, 1, "Sendflush: VMS IO error."},
294 { SYBEVOIDRET, 1, "Parameter of type SYBVOID cannot be a return parameter."},
295 { SYBEWAID, EXCONSISTENCY, "DB-LIBRARY internal error: ALTFMT following ALTNAME has wrong id."},
296 { SYBEWRIT, EXCOMM, "Write to SQL Server failed."},
297 { SYBEXOCI, EXNONFATAL, "A character-set translation overflowed its destination buffer while using bcp to copy data from a host-file to the SQL Server."},
298 { SYBEXTDN, EXPROGRAM, "Warning: the xlt_todisp parameter to dbfree_xlate() was NULL. The space associated with the xlt_tosrv parameter has been freed."},
299 { SYBEXTN, EXPROGRAM, "The xlt_todisp and xlt_tosrv parameters to dbfree_xlate() were NULL."},
300 { SYBEXTSN, EXPROGRAM, "Warning: the xlt_tosrv parameter to dbfree_xlate() was NULL. The space associated with the xlt_todisp parameter has been freed."},
301 { SYBEZTXT, EXINFO, "Attempt to send zero length TEXT or IMAGE to dataserver via dbwritetext()."},
302 { 0, 0, "Please add a description for this error to src/tds/error_table.h"}
agg_t
Definition: dbpivot.c:539
dbsqlexec
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
Definition: dblib.c:1424
sybdb.h
Primary include file for db-lib applications.
dbcurrow
DBINT dbcurrow(DBPROCESS *dbproc)
Get number of the row currently being read.
Definition: dblib.c:6190
_dblib_error_message
Definition: dblib.c:7742
tds_sybase_dbdaterec2
Definition: sybdb.h:506
tdsdbopen
DBPROCESS * tdsdbopen(LOGINREC *login, const char *server, int msdblib)
Form a connection with the server.
Definition: dblib.c:1184
dbmorecmds
RETCODE dbmorecmds(DBPROCESS *dbproc)
See if more commands are to be processed.
Definition: dblib.c:6241
tds_socket::has_status
bool has_status
true is ret_status is valid
Definition: tds.h:1246
tds_alloc_row
TDSRET tds_alloc_row(TDSRESULTINFO *res_info)
Allocate space for row store return NULL on out of memory.
Definition: mem.c:524
dbretdata
BYTE * dbretdata(DBPROCESS *dbproc, int retnum)
Get value of an output parameter filled by a stored procedure.
Definition: dblib.c:4757
tdsdaterec::month
TDS_INT month
month number (0-11)
Definition: tds.h:163
dbiscount
BOOL dbiscount(DBPROCESS *dbproc)
Indicates whether or not the count returned by dbcount is real (Microsoft-compatibility feature).
Definition: dblib.c:2808
tdsdaterec::second
TDS_INT second
0-59
Definition: tds.h:169
tds_quote_id
size_t tds_quote_id(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id.
Definition: query.c:2171
dbspr1row
RETCODE dbspr1row(DBPROCESS *dbproc, char *buffer, DBINT buf_len)
Print a regular result row to a buffer.
Definition: dblib.c:3461
TDS_DONE_MORE_RESULTS
@ TDS_DONE_MORE_RESULTS
more results follow
Definition: tds.h:253
dbdead
DBBOOL dbdead(DBPROCESS *dbproc)
Check if dbproc is an ex-parrot.
Definition: dblib.c:5062
dblib_context::query_timeout
int query_timeout
not used unless positive
Definition: dblib.c:188
dbhasretstat
DBBOOL dbhasretstat(DBPROCESS *dbproc)
Determine if query generated a return status number.
Definition: dblib.c:4654
dbrettype
int dbrettype(DBPROCESS *dbproc, int retnum)
Get datatype of a stored procedure's return parameter.
Definition: dblib.c:6270
dbprcollen
DBINT dbprcollen(DBPROCESS *dbproc, int column)
Get size of a result column needed to print column.
Definition: dblib.c:3196
dbmnyinc
RETCODE dbmnyinc(DBPROCESS *dbproc, DBMONEY *amount)
Add $0.0001 to a DBMONEY value.
Definition: dblib.c:5467
dbmnyminus
RETCODE dbmnyminus(DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
Negate a DBMONEY value.
Definition: dblib.c:5523
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:519
dbcount
DBINT dbcount(DBPROCESS *dbproc)
Get count of rows processed.
Definition: dblib.c:2828
dbalttype
int dbalttype(DBPROCESS *dbproc, int computeid, int column)
Get datatype for a compute column.
Definition: dblib.c:4344
dbsprline
RETCODE dbsprline(DBPROCESS *dbproc, char *buffer, DBINT buf_len, DBCHAR line_char)
Get formatted string for underlining dbsprhead() column names.
Definition: dblib.c:3841
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1244
_dbresults
static RETCODE _dbresults(DBPROCESS *dbproc)
Definition: dblib.c:1707
dbchange
char * dbchange(DBPROCESS *dbproc)
See if a command caused the current database to change.
Definition: dblib.c:6991
dbnumcols
int dbnumcols(DBPROCESS *dbproc)
Return number of regular columns in a result set.
Definition: dblib.c:1852
dbpivot
RETCODE dbpivot(DBPROCESS *dbproc, int nkeys, int *keys, int ncols, int *cols, DBPIVOT_FUNC func, int val)
Pivot the rows, creating a new resultset.
Definition: dbpivot.c:908
dbrecftos
void dbrecftos(const char filename[])
Record to a file all SQL commands sent to the server.
Definition: dblib.c:6771
DBVARYBIN
Definition: sybdb.h:269
DBCOL
Definition: sybdb.h:355
dbcmd
RETCODE dbcmd(DBPROCESS *dbproc, const char cmdstring[])
Append SQL to the command buffer.
Definition: dblib.c:1378
dbvarylen
DBINT dbvarylen(DBPROCESS *dbproc, int column)
Determine whether a column can vary in size.
Definition: dblib.c:3222
dbcolname
char * dbcolname(DBPROCESS *dbproc, int column)
Return name of a regular result column.
Definition: dblib.c:1876
dbanydatecrack
RETCODE dbanydatecrack(DBPROCESS *dbproc, DBDATEREC2 *di, int type, const void *data)
Break any kind of date or time value into useful pieces.
Definition: dblib.c:5872
tds.h
Main include file for libtds.
dbsetrow
STATUS dbsetrow(DBPROCESS *dbproc, DBINT row)
Make a buffered row "current" without fetching it into bound variables.
Definition: dblib.c:2049
DBLIBCONTEXT
struct dblib_context DBLIBCONTEXT
dbcancel
RETCODE dbcancel(DBPROCESS *dbproc)
Cancel the current command batch.
Definition: dblib.c:3398
dbsprhead
RETCODE dbsprhead(DBPROCESS *dbproc, char *buffer, DBINT buf_len)
Print result set headings to a buffer.
Definition: dblib.c:3899
tdsdaterec::timezone
TDS_INT timezone
-840 - 840 minutes from UTC
Definition: tds.h:171
tdsoldmoney
Definition: proto.h:33
dbmonthname
const char * dbmonthname(DBPROCESS *dbproc, char *language, int monthnum, DBBOOL shortform)
Get name of a month, in some human language.
Definition: dblib.c:6962
tds_blob
Information about blobs (e.g.
Definition: tds.h:594
dbclrbuf
void dbclrbuf(DBPROCESS *dbproc, DBINT n)
Clear n rows from the row buffer.
Definition: dblib.c:2848
dbsetlname
RETCODE dbsetlname(LOGINREC *login, const char *value, int which)
Set the value of a string in a LOGINREC structure.
Definition: dblib.c:764
tdsdaterec::year
TDS_INT year
year
Definition: tds.h:161
dbfreebuf
void dbfreebuf(DBPROCESS *dbproc)
Erase the command buffer, in case DBNOAUTOFREE was set with dbsetopt().
Definition: dblib.c:6064
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1255
dbconvert
DBINT dbconvert(DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen)
cf.
Definition: dblib.c:2597
dbopen
DBPROCESS * dbopen(LOGINREC *login, const char *server)
Normally not used.
Definition: dbopen.c:36
tds_socket::login
TDSLOGIN * login
config for login stuff.
Definition: tds.h:1259
dbgetpacket
int dbgetpacket(DBPROCESS *dbproc)
Get TDS packet size for the connection.
Definition: dblib.c:4079
tds_column::column_prec
TDS_TINYINT column_prec
precision for decimal/numeric
Definition: tds.h:704
dbsetinterrupt
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.
Definition: dblib.c:4635
tdsdump_open
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:112
dbtxptr
DBBINARY * dbtxptr(DBPROCESS *dbproc, int column)
Get text pointer for a column in the current row.
Definition: dblib.c:6561
dbretlen
int dbretlen(DBPROCESS *dbproc, int retnum)
Get size of an output parameter filled by a stored procedure.
Definition: dblib.c:4783
tds_dstr_empty
#define tds_dstr_empty(s)
Make a string empty.
Definition: string.h:91
KEY_T
Definition: bsqldb.c:80
tds_dstr_buf
static char * tds_dstr_buf(DSTR *s)
Returns a buffer to edit the string.
Definition: string.h:71
tds_result_info
Hold information for any results.
Definition: tds.h:770
dbaltop
int dbaltop(DBPROCESS *dbproc, int computeid, int column)
Get aggregation operator for a compute column.
Definition: dblib.c:4448
DBDATETIME
Definition: sybdb.h:295
TDS_DATETIMEALL
this structure is not directed connected to a TDS protocol but keeps any DATE/TIME information.
Definition: tds.h:147
dbcolutype
int dbcolutype(DBPROCESS *dbproc, int column)
Get user-defined datatype of a regular result column.
Definition: dblib.c:2997
dbsetavail
void dbsetavail(DBPROCESS *dbproc)
Mark a DBPROCESS as "available".
Definition: dblib.c:7279
dblib_context::login_timeout
int login_timeout
not used unless positive
Definition: dblib.c:187
dbgetmaxprocs
int dbgetmaxprocs(void)
get maximum simultaneous connections db-lib will open to the server.
Definition: dblib.c:4175
tdsdump_dump_buf
void tdsdump_dump_buf(const char *file, unsigned int level_line, const char *msg, const void *buf, size_t length)
Dump the contents of data into the log file in a human readable format.
Definition: log.c:256
tds_connection::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1102
dbprtype
const char * dbprtype(int token)
Print a token value's name to a buffer.
Definition: dblib.c:6451
dbstring
Definition: sybdb.h:342
tds_socket
Information for a server connection.
Definition: tds.h:1164
dbsettime
RETCODE dbsettime(int seconds)
Set maximum seconds db-lib waits for a server response to query.
Definition: dblib.c:4196
dbanullbind
RETCODE dbanullbind(DBPROCESS *dbproc, int computeid, int column, DBINT *indicator)
Tie a null-indicator to a compute result column.
Definition: dblib.c:2780
dbspr1rowlen
DBINT dbspr1rowlen(DBPROCESS *dbproc)
Determine size buffer required to hold the results returned by dbsprhead(), dbsprline(),...
Definition: dblib.c:3423
dbcollen
DBINT dbcollen(DBPROCESS *dbproc, int column)
Get size of a regular result column.
Definition: dblib.c:3173
tdsmoney4
Definition: proto.h:45
dbmsghandle
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
Definition: dblib.c:5144
dbstrcpy
RETCODE dbstrcpy(DBPROCESS *dbproc, int start, int numbytes, char *dest)
Get a copy of a chunk of the command buffer.
Definition: dblib.c:6346
tds_submit_query
TDSRET tds_submit_query(TDSSOCKET *tds, const char *query)
Sends a language string to the database server for processing.
Definition: query.c:210
is_datetime_type
#define is_datetime_type(x)
return true if type is a datetime (but not date or time)
Definition: tds.h:394
tds_willconvert
unsigned char tds_willconvert(int srctype, int desttype)
Test if a conversion is possible.
Definition: convert.c:3056
dblastrow
DBINT dblastrow(DBPROCESS *dbproc)
Get number of the last row in the row buffer.
Definition: dblib.c:7211
DBVERSION_UNKNOWN
#define DBVERSION_UNKNOWN
DBVERSION_xxx are used with dbsetversion()
Definition: sybdb.h:70
dbservcharset
char * dbservcharset(DBPROCESS *dbproc)
Get syscharset name of the server character set.
Definition: dblib.c:7027
dbstrbuild
RETCODE dbstrbuild(DBPROCESS *dbproc, char *charbuf, int bufsize, char *text, char *formats,...)
Build a printable string from text containing placeholders for variables.
Definition: dblib.c:7304
dbperror
int dbperror(DBPROCESS *dbproc, DBINT msgno, long errnum,...)
Call client-installed error handler.
Definition: dblib.c:8131
dbsetversion
RETCODE dbsetversion(DBINT version)
Specify a db-lib version level.
Definition: dblib.c:5980
dbdatlen
DBINT dbdatlen(DBPROCESS *dbproc, int column)
Get size of current row's data in a regular result column.
Definition: dblib.c:3328
tds_get_column_declaration
TDSRET tds_get_column_declaration(TDSSOCKET *tds, TDSCOLUMN *curcol, char *out)
Return declaration for column (like "varchar(20)").
Definition: query.c:718
tds_prtype
const char * tds_prtype(int type)
Returns string representation of the given type.
Definition: token.c:3052
_dblib_check_and_handle_interrupt
int _dblib_check_and_handle_interrupt(void *vdbproc)
check interrupts for libtds.
Definition: dbutil.c:192
DBMONEY4
Definition: sybdb.h:290
dblib_context::ref_count
int ref_count
reference count, time dbinit called
Definition: dblib.c:174
tds_context
Definition: tds.h:1030
dbrows
RETCODE dbrows(DBPROCESS *dbproc)
Indicate whether a query returned rows.
Definition: dblib.c:4038
dbbylist
BYTE * dbbylist(DBPROCESS *dbproc, int computeid, int *size)
Get bylist for a compute row.
Definition: dblib.c:5003
dbsetifile
void dbsetifile(char *filename)
set name and location of the interfaces file FreeTDS should use to look up a servername.
Definition: dblib.c:2715
dblib_context::tds_ctx_ref_count
int tds_ctx_ref_count
libTDS context reference counter
Definition: dblib.c:179
dbversion
const char * dbversion()
See which version of db-lib is in use.
Definition: dblib.c:6844
tds_prdatatype
static const char * tds_prdatatype(int datatype_token)
Returns type in string.
Definition: dblib.c:7354
dbsafestr
RETCODE dbsafestr(DBPROCESS *dbproc, const char *src, DBINT srclen, char *dest, DBINT destlen, int quotetype)
safely quotes character values in SQL text.
Definition: dblib.c:6390
dbexit
void dbexit()
Close server connections and free all related structures.
Definition: dblib.c:1557
dbcolinfo
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).
Definition: dblib.c:3049
tds_strftime
size_t tds_strftime(char *buf, size_t maxsize, const char *format, const TDSDATEREC *dr, int prec)
format a date string according to an "extended" strftime(3) formatting definition.
Definition: convert.c:2968
dbinit
RETCODE dbinit(void)
Initialize db-lib.
Definition: dblib.c:665
tds_socket::current_results
TDSRESULTINFO * current_results
Current query information.
Definition: tds.h:1239
tds_dblib_dbprocess::nullreps
NULLREP nullreps[MAXBINDTYPES]
default null values
Definition: dblib.h:159
dbclose
void dbclose(DBPROCESS *dbproc)
Close a connection to the server and free associated resources.
Definition: dblib.c:1490
tdsdatetime4
Definition: proto.h:56
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
tds_set_interfaces_file_loc
TDSRET tds_set_interfaces_file_loc(const char *interf)
Set the full name of interface file.
Definition: config.c:965
dbadata
BYTE * dbadata(DBPROCESS *dbproc, int computeid, int column)
Get address of compute column data.
Definition: dblib.c:4419
dbname
char * dbname(DBPROCESS *dbproc)
Get name of current database.
Definition: dblib.c:7011
tds_set_column_type
void tds_set_column_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:224
dbtxtimestamp
DBBINARY * dbtxtimestamp(DBPROCESS *dbproc, int column)
Get text timestamp for a column in the current row.
Definition: dblib.c:6531
tdsdump_log
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:354
tds_convert
TDS_INT tds_convert(const TDSCONTEXT *tds_ctx, int srctype, const void *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)
tds_convert convert a type to another.
Definition: convert.c:1878
default_err_handler
static int default_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
default error handler for db-lib (handles library-generated errors)
Definition: dblib.c:5096
tds_dblib_dbprocess::msdblib
int msdblib
boolean use ms behaviour
Definition: dblib.h:154
tds_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:695
dbnullbind
RETCODE dbnullbind(DBPROCESS *dbproc, int column, DBINT *indicator)
Tie a null-indicator to a regular result column.
Definition: dblib.c:2744
dbcolsource
char * dbcolsource(DBPROCESS *dbproc, int column)
Get base database column name for a result set column.
Definition: dblib.c:3148
dbsetlbool
RETCODE dbsetlbool(LOGINREC *login, int value, int which)
Set a boolean value in a LOGINREC structure.
Definition: dblib.c:901
dbmny4cmp
int dbmny4cmp(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2)
Compare two DBMONEY4 values.
Definition: dblib.c:5716
tds_close_socket
void tds_close_socket(TDSSOCKET *tds)
Close current socket.
Definition: net.c:548
tds_set_server
bool tds_set_server(TDSLOGIN *tds_login, const char *server) TDS_WUR
Set the servername in a TDSLOGIN structure.
Definition: login.c:125
dbmny4minus
RETCODE dbmny4minus(DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest)
Negate a DBMONEY4 value.
Definition: dblib.c:5550
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:966
metadata_t
Definition: dbpivot.c:707
dbclropt
RETCODE dbclropt(DBPROCESS *dbproc, int option, const char param[])
Reset an option.
Definition: dblib.c:6099
tds_read_config_info
TDSLOGIN * tds_read_config_info(TDSSOCKET *tds, TDSLOGIN *login, TDSLOCALE *locale)
tds_read_config_info() will fill the tds connection structure based on configuration information gath...
Definition: config.c:138
dboption
Definition: dblib.h:110
dbaltcolid
int dbaltcolid(DBPROCESS *dbproc, int computeid, int column)
Get column ID of a compute column.
Definition: dblib.c:4288
dbaltlen
DBINT dbaltlen(DBPROCESS *dbproc, int computeid, int column)
Get size of data in compute column.
Definition: dblib.c:7141
dbdata
BYTE * dbdata(DBPROCESS *dbproc, int column)
Get address of data in a regular result column.
Definition: dblib.c:3356
DBNUMERIC
Definition: sybdb.h:275
tds_dstr_cstr
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
tdsdaterec::quarter
TDS_INT quarter
quarter (0-3)
Definition: tds.h:162
dbgetnull
RETCODE dbgetnull(DBPROCESS *dbproc, int bindtype, int varlen, BYTE *varaddr)
Definition: dblib.c:534
dbprrow
RETCODE dbprrow(DBPROCESS *dbproc)
Print a result set to stdout.
Definition: dblib.c:3544
dbstrlen
int dbstrlen(DBPROCESS *dbproc)
Get size of the command buffer, in bytes.
Definition: dblib.c:6295
tds_process_tokens
TDSRET tds_process_tokens(TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag)
process all streams.
Definition: token.c:530
dbrowtype
STATUS dbrowtype(DBPROCESS *dbproc)
Get returned row's type.
Definition: dblib.c:6207
tdsdaterec::minute
TDS_INT minute
0-59
Definition: tds.h:168
dbmnyzero
RETCODE dbmnyzero(DBPROCESS *dbproc, DBMONEY *dest)
Set a DBMONEY value to zero.
Definition: dblib.c:5328
dbloginfree
void dbloginfree(LOGINREC *login)
free the LOGINREC
Definition: dblib.c:742
dbmnycmp
int dbmnycmp(DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2)
Compare two DBMONEY values.
Definition: dblib.c:5270
dbiordesc
int dbiordesc(DBPROCESS *dbproc)
Get file descriptor of the socket used by a DBPROCESS to read data coming from the server....
Definition: dblib.c:7235
dbmny4sub
RETCODE dbmny4sub(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *diff)
Subtract two DBMONEY4 values.
Definition: dblib.c:5628
dbsetlversion
RETCODE dbsetlversion(LOGINREC *login, BYTE version)
Set TDS version for future connections.
Definition: dblib.c:952
dbadlen
DBINT dbadlen(DBPROCESS *dbproc, int computeid, int column)
Get size of data in a compute column.
Definition: dblib.c:4314
tds_dstr_len
static size_t tds_dstr_len(const DSTR *s)
Returns the length of the string in bytes.
Definition: string.h:85
tds_column::column_scale
TDS_TINYINT column_scale
scale for decimal/numeric
Definition: tds.h:705
dbisopt
DBBOOL dbisopt(DBPROCESS *dbproc, int option, const char param[])
Get value of an option.
Definition: dblib.c:6167
dbdatecmp
int dbdatecmp(DBPROCESS *dbproc, DBDATETIME *d1, DBDATETIME *d2)
Compare DBDATETIME values, similar to strcmp(3).
Definition: dblib.c:5769
dbcanquery
RETCODE dbcanquery(DBPROCESS *dbproc)
Cancel the query currently being retrieved, discarding all pending rows.
Definition: dblib.c:6035
TDS_DONE_ERROR
@ TDS_DONE_ERROR
error occurred
Definition: tds.h:254
tdsdaterec::decimicrosecond
TDS_INT decimicrosecond
0-9999999
Definition: tds.h:170
DBVARYCHAR
Definition: sybdb.h:263
conv_result
Definition: convert.h:34
dberrhandle
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
Definition: dblib.c:5125
dbtds
int dbtds(DBPROCESS *dbproc)
Get the TDS version in use for dbproc.
Definition: dblib.c:6805
dblib_context
Definition: dblib.c:172
tdsdaterec::day
TDS_INT day
day of month (1-31)
Definition: tds.h:164
DBPROC_ROWBUF
Definition: dblib.h:52
tds_message
Definition: tds.h:877
dbsetnull
RETCODE dbsetnull(DBPROCESS *dbproc, int bindtype, int bindlen, BYTE *bindval)
Define substitution values to be used when binding null values.
Definition: dblib.c:1966
name_t
Definition: dbpivot.c:1264
DBCOL2
Definition: sybdb.h:374
tds_login
Definition: tds.h:518
tds_dblib_dbprocess
Definition: dblib.h:123
tds_get_conversion_type
TDS_SERVER_TYPE tds_get_conversion_type(TDS_SERVER_TYPE srctype, int colsize)
Return type suitable for conversions (convert all nullable types to fixed type)
Definition: tds_types.h:125
dbwillconvert
DBBOOL dbwillconvert(int srctype, int desttype)
Test whether or not a datatype can be converted to another datatype.
Definition: dblib.c:2878
dbsetlogintime
RETCODE dbsetlogintime(int seconds)
Set maximum seconds db-lib waits for a server response to a login attempt.
Definition: dblib.c:4243
dbgetrow
RETCODE dbgetrow(DBPROCESS *dbproc, DBINT row)
Read a row from the row buffer.
Definition: dblib.c:1934
tds_writetext_continue
TDSRET tds_writetext_continue(TDSSOCKET *tds, const TDS_UCHAR *text, TDS_UINT size)
Send some data in the writetext request started by tds_writetext_start.
Definition: bulk.c:1171
tds_column::column_cur_size
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:737
tds_dstr
Structure to hold a string.
Definition: string.h:36
dbresults
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
Definition: dblib.c:1698
tds_column::column_varint_size
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
Definition: tds.h:702
dbmny4copy
RETCODE dbmny4copy(DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest)
Copy a DBMONEY4 value.
Definition: dblib.c:5744
tdsdatetime
Definition: proto.h:50
dbmnycopy
RETCODE dbmnycopy(DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
Copy a DBMONEY value.
Definition: dblib.c:6014
dbsetopt
RETCODE dbsetopt(DBPROCESS *dbproc, int option, const char *char_param, int int_param)
Set db-lib or server option.
Definition: dblib.c:4475
tdsdaterec::weekday
TDS_INT weekday
day of week (0-6, 0 = sunday)
Definition: tds.h:166
dbacolname
const char * dbacolname(DBPROCESS *dbproc, int computeid, int column)
Return name of a computed result column.
Definition: dblib.c:1902
dbnumrets
int dbnumrets(DBPROCESS *dbproc)
Get count of output parameters filled by a stored procedure.
Definition: dblib.c:4696
dblogin
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
Definition: dblib.c:710
dbretname
char * dbretname(DBPROCESS *dbproc, int retnum)
Get name of an output parameter filled by a stored procedure.
Definition: dblib.c:4728
col_t
Definition: dbpivot.c:76
dbwritetext
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.
Definition: dblib.c:6598
DBDATETIME4
Definition: sybdb.h:301
tdsdaterec
Used by tds_datecrack.
Definition: tds.h:160
dbsetuserdata
void dbsetuserdata(DBPROCESS *dbproc, BYTE *ptr)
Associate client-allocated (and defined) data with a DBPROCESS.
Definition: dblib.c:5944
tds_writetext_end
TDSRET tds_writetext_end(TDSSOCKET *tds)
Finish sending writetext data.
Definition: bulk.c:1188
dbprhead
void dbprhead(DBPROCESS *dbproc)
Print result set headings to stdout.
Definition: dblib.c:3963
dbnumcompute
int dbnumcompute(DBPROCESS *dbproc)
Get count of COMPUTE clauses for a result set.
Definition: dblib.c:4977
tdsnumeric
Definition: proto.h:26
tds_writetext_start
TDSRET tds_writetext_start(TDSSOCKET *tds, const char *objname, const char *textptr, const char *timestamp, int with_log, TDS_UINT size)
Start writing writetext request.
Definition: bulk.c:1133
tds_get_size_by_type
int tds_get_size_by_type(TDS_SERVER_TYPE servertype)
Return the number of bytes needed by specified type.
Definition: tds_types.h:9
tds_sybase_dbdaterec
Definition: sybdb.h:474
tds_fix_login
void tds_fix_login(TDSLOGIN *login)
Fix configuration after reading it.
Definition: config.c:285
dbmoretext
RETCODE dbmoretext(DBPROCESS *dbproc, DBINT size, const BYTE text[])
Send chunk of a text/image value to the server.
Definition: dblib.c:6736
tds_socket::ret_status
TDS_INT ret_status
return status from store procedure
Definition: tds.h:1251
dbbind
RETCODE dbbind(DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr)
Tie a host variable to a resultset column.
Definition: dblib.c:2638
dbcoltypeinfo
DBTYPEINFO * dbcoltypeinfo(DBPROCESS *dbproc, int column)
Get precision and scale information for a regular result column.
Definition: dblib.c:3020
_dbcoldata
static BYTE * _dbcoldata(TDSCOLUMN *colinfo)
Return data from a column.
Definition: dblib.c:3372
tds_login::password
DSTR password
password of account login
Definition: tds.h:536
dbsqlok
RETCODE dbsqlok(DBPROCESS *dbproc)
Wait for results of a query from the server.
Definition: dblib.c:4818
dbgettime
int dbgettime(void)
Get maximum seconds db-lib waits for a server response to query.
Definition: dblib.c:4227
dbmny4add
RETCODE dbmny4add(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *sum)
Add two DBMONEY4 values.
Definition: dblib.c:5597
tds_datecrack
TDSRET tds_datecrack(TDS_INT datetype, const void *di, TDSDATEREC *dr)
Convert from db date format to a structured date format.
Definition: convert.c:3122
dbdatecrack
RETCODE dbdatecrack(DBPROCESS *dbproc, DBDATEREC *di, DBDATETIME *datetime)
Break a DBDATETIME value into useful pieces.
Definition: dblib.c:5851
dbcmdrow
RETCODE dbcmdrow(DBPROCESS *dbproc)
See if the current command can return rows.
Definition: dblib.c:4264
dbmnydec
RETCODE dbmnydec(DBPROCESS *dbproc, DBMONEY *amount)
Subtract $0.0001 from a DBMONEY value.
Definition: dblib.c:5495
dbmnymaxneg
RETCODE dbmnymaxneg(DBPROCESS *dbproc, DBMONEY *amount)
Get maximum negative DBMONEY value supported.
Definition: dblib.c:5370
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:794
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:690
dbcoltype
int dbcoltype(DBPROCESS *dbproc, int column)
Get the datatype of a regular result set column.
Definition: dblib.c:2974
dbfirstrow
DBINT dbfirstrow(DBPROCESS *dbproc)
See if a server response has arrived.
Definition: dblib.c:7196
dbgetchar
char * dbgetchar(DBPROCESS *dbproc, int pos)
Get address of a position in the command buffer.
Definition: dblib.c:6314
tdsdaterec::hour
TDS_INT hour
0-23
Definition: tds.h:167
dbtypeinfo
Definition: sybdb.h:336
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
tds_process_cancel
TDSRET tds_process_cancel(TDSSOCKET *tds)
Definition: token.c:2550
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:535
tds_send_cancel
TDSRET tds_send_cancel(TDSSOCKET *tds)
tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should be called dire...
Definition: query.c:2026
dbcurcmd
int dbcurcmd(DBPROCESS *dbproc)
Get number of the row just returned.
Definition: dblib.c:6224
dbspid
int dbspid(DBPROCESS *dbproc)
Get server process ID for a DBPROCESS.
Definition: dblib.c:5924
tdsdaterec::dayofyear
TDS_INT dayofyear
day of year (1-366)
Definition: tds.h:165
tds_column::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:697
DBTDS_UNKNOWN
#define DBTDS_UNKNOWN
DBTDS_xxx are returned by DBTDS() The integer values of the constants are poorly chosen.
Definition: sybdb.h:88
dbgetuserdata
BYTE * dbgetuserdata(DBPROCESS *dbproc)
Get address of user-allocated data from a DBPROCESS.
Definition: dblib.c:5962
dbaltutype
DBINT dbaltutype(DBPROCESS *dbproc, int computeid, int column)
Get user-defined datatype of a compute column.
Definition: dblib.c:7118
dbsetllong
RETCODE dbsetllong(LOGINREC *login, long value, int which)
Set an integer value in a LOGINREC structure.
Definition: dblib.c:830
dbaltbind
RETCODE dbaltbind(DBPROCESS *dbproc, int computeid, int column, int vartype, DBINT varlen, BYTE *varaddr)
Bind a compute column to a program variable.
Definition: dblib.c:4373
dbsetmaxprocs
RETCODE dbsetmaxprocs(int maxprocs)
Set maximum simultaneous connections db-lib will open to the server.
Definition: dblib.c:4103
dbconvert_ps
DBINT dbconvert_ps(DBPROCESS *dbproc, int db_srctype, const BYTE *src, DBINT srclen, int db_desttype, BYTE *dest, DBINT destlen, DBTYPEINFO *typeinfo)
Convert one datatype to another.
Definition: dblib.c:2304
dbmny4zero
RETCODE dbmny4zero(DBPROCESS *dbproc, DBMONEY4 *dest)
Zero a DBMONEY4 value.
Definition: dblib.c:5574
pivot_t
Definition: dbpivot.c:766
NULLREP
Definition: dblib.h:117
dbcolptr
static TDSCOLUMN * dbcolptr(DBPROCESS *dbproc, int column)
Sanity checks for column-oriented functions.
Definition: dblib.c:336
dbfcmd
RETCODE dbfcmd(DBPROCESS *dbproc, const char *fmt,...)
printf-like way to form SQL to send to the server.
Definition: dblib.c:1339
DBMONEY
Definition: sybdb.h:284
dblib_context::tds_ctx
TDSCONTEXT * tds_ctx
libTDS context
Definition: dblib.c:177
dbnumalts
int dbnumalts(DBPROCESS *dbproc, int computeid)
Get count of columns in a compute row.
Definition: dblib.c:4944
dbreadtext
STATUS dbreadtext(DBPROCESS *dbproc, void *buf, DBINT bufsize)
Fetch part of a text or image value from the server.
Definition: dblib.c:6667
dbiowdesc
int dbiowdesc(DBPROCESS *dbproc)
Get file descriptor of the socket used by a DBPROCESS to write data coming to the server....
Definition: dblib.c:7251
dbretstatus
DBINT dbretstatus(DBPROCESS *dbproc)
Fetch status value returned by query or remote procedure call.
Definition: dblib.c:4678
DBDEAD
#define DBDEAD(x)
Sybase macro mapping to the Microsoft (lower-case) function.
Definition: sybdb.h:761
dbtablecolinfo
RETCODE dbtablecolinfo(DBPROCESS *dbproc, DBINT column, DBCOL *pdbcol)
describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo)
Definition: dblib.c:6468
DBLIB_ERROR_MESSAGE
struct _dblib_error_message DBLIB_ERROR_MESSAGE
tds_dstr_copy
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another
Definition: tdsstring.c:122
dbuse
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
Definition: dblib.c:1450
dbsqlsend
RETCODE dbsqlsend(DBPROCESS *dbproc)
Transmit the command buffer to the server.
Definition: dblib.c:7047
dbmnymaxpos
RETCODE dbmnymaxpos(DBPROCESS *dbproc, DBMONEY *amount)
Get maximum positive DBMONEY value supported.
Definition: dblib.c:5349
LOGINREC
Definition: bsqlodbc.c:100