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"}
_dblib_check_and_handle_interrupt
int _dblib_check_and_handle_interrupt(void *vdbproc)
check interrupts for libtds.
Definition: dbutil.c:192
DBMONEY
Definition: sybdb.h:284
dbsettime
RETCODE dbsettime(int seconds)
Set maximum seconds db-lib waits for a server response to query.
Definition: dblib.c:4192
dbmoretext
RETCODE dbmoretext(DBPROCESS *dbproc, DBINT size, const BYTE text[])
Send chunk of a text/image value to the server.
Definition: dblib.c:6732
dbcoltypeinfo
DBTYPEINFO * dbcoltypeinfo(DBPROCESS *dbproc, int column)
Get precision and scale information for a regular result column.
Definition: dblib.c:3016
dbsetifile
void dbsetifile(char *filename)
set name and location of the interfaces file FreeTDS should use to look up a servername.
Definition: dblib.c:2711
dbversion
const char * dbversion()
See which version of db-lib is in use.
Definition: dblib.c:6840
tdsdaterec::quarter
TDS_INT quarter
quarter (0-3)
Definition: tds.h:161
tdsdaterec
Used by tds_datecrack.
Definition: tds.h:159
dbretlen
int dbretlen(DBPROCESS *dbproc, int retnum)
Get size of an output parameter filled by a stored procedure.
Definition: dblib.c:4779
dbdatecrack
RETCODE dbdatecrack(DBPROCESS *dbproc, DBDATEREC *di, DBDATETIME *datetime)
Break a DBDATETIME value into useful pieces.
Definition: dblib.c:5847
tds_dstr_empty
#define tds_dstr_empty(s)
Make a string empty.
Definition: string.h:91
dbclose
void dbclose(DBPROCESS *dbproc)
Close a connection to the server and free associated resources.
Definition: dblib.c:1485
dblib_context::tds_ctx_ref_count
int tds_ctx_ref_count
libTDS context reference counter
Definition: dblib.c:179
dbmny4sub
RETCODE dbmny4sub(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *diff)
Subtract two DBMONEY4 values.
Definition: dblib.c:5624
dbsetopt
RETCODE dbsetopt(DBPROCESS *dbproc, int option, const char *char_param, int int_param)
Set db-lib or server option.
Definition: dblib.c:4471
dbacolname
const char * dbacolname(DBPROCESS *dbproc, int computeid, int column)
Return name of a computed result column.
Definition: dblib.c:1898
dbmnydec
RETCODE dbmnydec(DBPROCESS *dbproc, DBMONEY *amount)
Subtract $0.0001 from a DBMONEY value.
Definition: dblib.c:5491
dbnumrets
int dbnumrets(DBPROCESS *dbproc)
Get count of output parameters filled by a stored procedure.
Definition: dblib.c:4692
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
tds_socket::has_status
bool has_status
true is ret_status is valid
Definition: tds.h:1245
dbsetversion
RETCODE dbsetversion(DBINT version)
Specify a db-lib version level.
Definition: dblib.c:5976
dblib_context::tds_ctx
TDSCONTEXT * tds_ctx
libTDS context
Definition: dblib.c:177
tds_login::password
DSTR password
password of account login
Definition: tds.h:535
tdsdaterec::decimicrosecond
TDS_INT decimicrosecond
0-9999999
Definition: tds.h:169
tds_prtype
const char * tds_prtype(int type)
Returns string representation of the given type.
Definition: token.c:3056
dbnumcompute
int dbnumcompute(DBPROCESS *dbproc)
Get count of COMPUTE clauses for a result set.
Definition: dblib.c:4973
dbgetchar
char * dbgetchar(DBPROCESS *dbproc, int pos)
Get address of a position in the command buffer.
Definition: dblib.c:6310
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:2992
dbdead
DBBOOL dbdead(DBPROCESS *dbproc)
Check if dbproc is an ex-parrot.
Definition: dblib.c:5058
dblib_context::login_timeout
int login_timeout
not used unless positive
Definition: dblib.c:187
tds.h
Main include file for libtds.
tds_connection::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1101
dbbylist
BYTE * dbbylist(DBPROCESS *dbproc, int computeid, int *size)
Get bylist for a compute row.
Definition: dblib.c:4999
dbnullbind
RETCODE dbnullbind(DBPROCESS *dbproc, int column, DBINT *indicator)
Tie a null-indicator to a regular result column.
Definition: dblib.c:2740
tdsdaterec::day
TDS_INT day
day of month (1-31)
Definition: tds.h:163
is_datetime_type
#define is_datetime_type(x)
return true if type is a datetime (but not date or time)
Definition: tds.h:393
dbcolsource
char * dbcolsource(DBPROCESS *dbproc, int column)
Get base database column name for a result set column.
Definition: dblib.c:3144
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
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:6386
DBLIBCONTEXT
struct dblib_context DBLIBCONTEXT
DBNUMERIC
Definition: sybdb.h:275
dbexit
void dbexit()
Close server connections and free all related structures.
Definition: dblib.c:1552
tds_socket::login
TDSLOGIN * login
config for login stuff.
Definition: tds.h:1258
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:4369
dbaltcolid
int dbaltcolid(DBPROCESS *dbproc, int computeid, int column)
Get column ID of a compute column.
Definition: dblib.c:4284
DBVARYBIN
Definition: sybdb.h:269
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
LOGINREC
Definition: bsqlodbc.c:100
dbprrow
RETCODE dbprrow(DBPROCESS *dbproc)
Print a result set to stdout.
Definition: dblib.c:3540
dbcolptr
static TDSCOLUMN * dbcolptr(DBPROCESS *dbproc, int column)
Sanity checks for column-oriented functions.
Definition: dblib.c:331
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:1891
tds_fix_login
void tds_fix_login(TDSLOGIN *login)
Fix configuration after reading it.
Definition: config.c:285
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
dbreadtext
STATUS dbreadtext(DBPROCESS *dbproc, void *buf, DBINT bufsize)
Fetch part of a text or image value from the server.
Definition: dblib.c:6663
tdsdaterec::weekday
TDS_INT weekday
day of week (0-6, 0 = sunday)
Definition: tds.h:165
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1254
DBDEAD
#define DBDEAD(x)
Sybase macro mapping to the Microsoft (lower-case) function.
Definition: sybdb.h:762
tds_column::column_prec
TDS_TINYINT column_prec
precision for decimal/numeric
Definition: tds.h:703
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1243
tds_close_socket
void tds_close_socket(TDSSOCKET *tds)
Close current socket.
Definition: net.c:548
dbsqlsend
RETCODE dbsqlsend(DBPROCESS *dbproc)
Transmit the command buffer to the server.
Definition: dblib.c:7043
conv_result
Definition: convert.h:34
dberrhandle
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
Definition: dblib.c:5121
dbgetuserdata
BYTE * dbgetuserdata(DBPROCESS *dbproc)
Get address of user-allocated data from a DBPROCESS.
Definition: dblib.c:5958
dbaltutype
DBINT dbaltutype(DBPROCESS *dbproc, int computeid, int column)
Get user-defined datatype of a compute column.
Definition: dblib.c:7114
dbclropt
RETCODE dbclropt(DBPROCESS *dbproc, int option, const char param[])
Reset an option.
Definition: dblib.c:6095
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
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
tds_set_interfaces_file_loc
TDSRET tds_set_interfaces_file_loc(const char *interf)
Set the full name of interface file.
Definition: config.c:961
dbmnycmp
int dbmnycmp(DBPROCESS *dbproc, DBMONEY *m1, DBMONEY *m2)
Compare two DBMONEY values.
Definition: dblib.c:5266
dbmny4add
RETCODE dbmny4add(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2, DBMONEY4 *sum)
Add two DBMONEY4 values.
Definition: dblib.c:5593
dbmny4zero
RETCODE dbmny4zero(DBPROCESS *dbproc, DBMONEY4 *dest)
Zero a DBMONEY4 value.
Definition: dblib.c:5570
tdsdbopen
DBPROCESS * tdsdbopen(LOGINREC *login, const char *server, int msdblib)
Form a connection with the server.
Definition: dblib.c:1179
dbmorecmds
RETCODE dbmorecmds(DBPROCESS *dbproc)
See if more commands are to be processed.
Definition: dblib.c:6237
agg_t
Definition: dbpivot.c:545
dbmnycopy
RETCODE dbmnycopy(DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
Copy a DBMONEY value.
Definition: dblib.c:6010
dbsetlogintime
RETCODE dbsetlogintime(int seconds)
Set maximum seconds db-lib waits for a server response to a login attempt.
Definition: dblib.c:4239
tds_process_cancel
TDSRET tds_process_cancel(TDSSOCKET *tds)
Definition: token.c:2554
DBVARYCHAR
Definition: sybdb.h:263
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:129
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:7247
dbsetlversion
RETCODE dbsetlversion(LOGINREC *login, BYTE version)
Set TDS version for future connections.
Definition: dblib.c:947
dbrettype
int dbrettype(DBPROCESS *dbproc, int retnum)
Get datatype of a stored procedure's return parameter.
Definition: dblib.c:6266
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:5092
dbprcollen
DBINT dbprcollen(DBPROCESS *dbproc, int column)
Get size of a result column needed to print column.
Definition: dblib.c:3192
dbresults
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
Definition: dblib.c:1694
dbalttype
int dbalttype(DBPROCESS *dbproc, int computeid, int column)
Get datatype for a compute column.
Definition: dblib.c:4340
dbsetlbool
RETCODE dbsetlbool(LOGINREC *login, int value, int which)
Set a boolean value in a LOGINREC structure.
Definition: dblib.c:896
tdsdatetime
Definition: proto.h:50
dbmnyminus
RETCODE dbmnyminus(DBPROCESS *dbproc, DBMONEY *src, DBMONEY *dest)
Negate a DBMONEY value.
Definition: dblib.c:5519
dbchange
char * dbchange(DBPROCESS *dbproc)
See if a command caused the current database to change.
Definition: dblib.c:6987
tdsdaterec::dayofyear
TDS_INT dayofyear
day of year (1-366)
Definition: tds.h:164
dbmnyinc
RETCODE dbmnyinc(DBPROCESS *dbproc, DBMONEY *amount)
Add $0.0001 to a DBMONEY value.
Definition: dblib.c:5463
dbretname
char * dbretname(DBPROCESS *dbproc, int retnum)
Get name of an output parameter filled by a stored procedure.
Definition: dblib.c:4724
dbsetavail
void dbsetavail(DBPROCESS *dbproc)
Mark a DBPROCESS as "available".
Definition: dblib.c:7275
dbvarylen
DBINT dbvarylen(DBPROCESS *dbproc, int column)
Determine whether a column can vary in size.
Definition: dblib.c:3218
dbsetuserdata
void dbsetuserdata(DBPROCESS *dbproc, BYTE *ptr)
Associate client-allocated (and defined) data with a DBPROCESS.
Definition: dblib.c:5940
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:5868
dbprhead
void dbprhead(DBPROCESS *dbproc)
Print result set headings to stdout.
Definition: dblib.c:3959
tds_message
Definition: tds.h:876
tds_prdatatype
static const char * tds_prdatatype(int datatype_token)
Returns type in string.
Definition: dblib.c:7350
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:3045
KEY_T
Definition: bsqldb.c:80
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
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:689
dbspr1row
RETCODE dbspr1row(DBPROCESS *dbproc, char *buffer, DBINT buf_len)
Print a regular result row to a buffer.
Definition: dblib.c:3457
dbstring
Definition: sybdb.h:342
dbretstatus
DBINT dbretstatus(DBPROCESS *dbproc)
Fetch status value returned by query or remote procedure call.
Definition: dblib.c:4674
DBVERSION_UNKNOWN
#define DBVERSION_UNKNOWN
DBVERSION_xxx are used with dbsetversion()
Definition: sybdb.h:70
_dbcoldata
static BYTE * _dbcoldata(TDSCOLUMN *colinfo)
Return data from a column.
Definition: dblib.c:3368
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:7231
dbclrbuf
void dbclrbuf(DBPROCESS *dbproc, DBINT n)
Clear n rows from the row buffer.
Definition: dblib.c:2844
dbmny4minus
RETCODE dbmny4minus(DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest)
Negate a DBMONEY4 value.
Definition: dblib.c:5546
dbdatecmp
int dbdatecmp(DBPROCESS *dbproc, DBDATETIME *d1, DBDATETIME *d2)
Compare DBDATETIME values, similar to strcmp(3).
Definition: dblib.c:5765
dbmnymaxneg
RETCODE dbmnymaxneg(DBPROCESS *dbproc, DBMONEY *amount)
Get maximum negative DBMONEY value supported.
Definition: dblib.c:5366
dbmonthname
const char * dbmonthname(DBPROCESS *dbproc, char *language, int monthnum, DBBOOL shortform)
Get name of a month, in some human language.
Definition: dblib.c:6958
dbsprline
RETCODE dbsprline(DBPROCESS *dbproc, char *buffer, DBINT buf_len, DBCHAR line_char)
Get formatted string for underlining dbsprhead() column names.
Definition: dblib.c:3837
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:1185
dblastrow
DBINT dblastrow(DBPROCESS *dbproc)
Get number of the last row in the row buffer.
Definition: dblib.c:7207
dbcmd
RETCODE dbcmd(DBPROCESS *dbproc, const char cmdstring[])
Append SQL to the command buffer.
Definition: dblib.c:1373
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:914
dblib_context::query_timeout
int query_timeout
not used unless positive
Definition: dblib.c:188
dbmnymaxpos
RETCODE dbmnymaxpos(DBPROCESS *dbproc, DBMONEY *amount)
Get maximum positive DBMONEY value supported.
Definition: dblib.c:5345
dbcolutype
int dbcolutype(DBPROCESS *dbproc, int column)
Get user-defined datatype of a regular result column.
Definition: dblib.c:2993
dbsetrow
STATUS dbsetrow(DBPROCESS *dbproc, DBINT row)
Make a buffered row "current" without fetching it into bound variables.
Definition: dblib.c:2045
dblib_context::ref_count
int ref_count
reference count, time dbinit called
Definition: dblib.c:174
tdsmoney4
Definition: proto.h:45
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:3172
dbcancel
RETCODE dbcancel(DBPROCESS *dbproc)
Cancel the current command batch.
Definition: dblib.c:3394
tds_sybase_dbdaterec2
Definition: sybdb.h:506
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
tds_blob
Information about blobs (e.g.
Definition: tds.h:593
dbprtype
const char * dbprtype(int token)
Print a token value's name to a buffer.
Definition: dblib.c:6447
dbrowtype
STATUS dbrowtype(DBPROCESS *dbproc)
Get returned row's type.
Definition: dblib.c:6203
dbbind
RETCODE dbbind(DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr)
Tie a host variable to a resultset column.
Definition: dblib.c:2634
dbmny4cmp
int dbmny4cmp(DBPROCESS *dbproc, DBMONEY4 *m1, DBMONEY4 *m2)
Compare two DBMONEY4 values.
Definition: dblib.c:5712
DBMONEY4
Definition: sybdb.h:290
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:1147
dbspid
int dbspid(DBPROCESS *dbproc)
Get server process ID for a DBPROCESS.
Definition: dblib.c:5920
tds_dstr
Structure to hold a string.
Definition: string.h:36
tds_result_info
Hold information for any results.
Definition: tds.h:769
tdsdaterec::hour
TDS_INT hour
0-23
Definition: tds.h:166
tds_dblib_dbprocess::nullreps
NULLREP nullreps[MAXBINDTYPES]
default null values
Definition: dblib.h:159
dbsqlok
RETCODE dbsqlok(DBPROCESS *dbproc)
Wait for results of a query from the server.
Definition: dblib.c:4814
dbgettime
int dbgettime(void)
Get maximum seconds db-lib waits for a server response to query.
Definition: dblib.c:4223
dbgetnull
RETCODE dbgetnull(DBPROCESS *dbproc, int bindtype, int varlen, BYTE *varaddr)
Definition: dblib.c:529
tds_socket::current_results
TDSRESULTINFO * current_results
Current query information.
Definition: tds.h:1238
dbopen
DBPROCESS * dbopen(LOGINREC *login, const char *server)
Normally not used.
Definition: dbopen.c:36
dbgetpacket
int dbgetpacket(DBPROCESS *dbproc)
Get TDS packet size for the connection.
Definition: dblib.c:4075
tdsdaterec::month
TDS_INT month
month number (0-11)
Definition: tds.h:162
dbtxptr
DBBINARY * dbtxptr(DBPROCESS *dbproc, int column)
Get text pointer for a column in the current row.
Definition: dblib.c:6557
dbsetmaxprocs
RETCODE dbsetmaxprocs(int maxprocs)
Set maximum simultaneous connections db-lib will open to the server.
Definition: dblib.c:4099
tdsdaterec::second
TDS_INT second
0-59
Definition: tds.h:168
pivot_t
Definition: dbpivot.c:772
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
NULLREP
Definition: dblib.h:117
dbcoltype
int dbcoltype(DBPROCESS *dbproc, int column)
Get the datatype of a regular result set column.
Definition: dblib.c:2970
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:518
dbdatlen
DBINT dbdatlen(DBPROCESS *dbproc, int column)
Get size of current row's data in a regular result column.
Definition: dblib.c:3324
tds_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:694
dbhasretstat
DBBOOL dbhasretstat(DBPROCESS *dbproc)
Determine if query generated a return status number.
Definition: dblib.c:4650
tds_socket::ret_status
TDS_INT ret_status
return status from store procedure
Definition: tds.h:1250
dbanullbind
RETCODE dbanullbind(DBPROCESS *dbproc, int computeid, int column, DBINT *indicator)
Tie a null-indicator to a compute result column.
Definition: dblib.c:2776
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:6464
dbmnyzero
RETCODE dbmnyzero(DBPROCESS *dbproc, DBMONEY *dest)
Set a DBMONEY value to zero.
Definition: dblib.c:5324
tdsdaterec::timezone
TDS_INT timezone
-840 - 840 minutes from UTC
Definition: tds.h:170
dbcollen
DBINT dbcollen(DBPROCESS *dbproc, int column)
Get size of a regular result column.
Definition: dblib.c:3169
tds_column::column_cur_size
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:736
dbmsghandle
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
Definition: dblib.c:5140
dbinit
RETCODE dbinit(void)
Initialize db-lib.
Definition: dblib.c:660
dbsqlexec
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
Definition: dblib.c:1419
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:701
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:2300
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:6186
_dblib_error_message
Definition: dblib.c:7738
tdsdump_open
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:131
dbadata
BYTE * dbadata(DBPROCESS *dbproc, int computeid, int column)
Get address of compute column data.
Definition: dblib.c:4415
dbname
char * dbname(DBPROCESS *dbproc)
Get name of current database.
Definition: dblib.c:7007
dbfcmd
RETCODE dbfcmd(DBPROCESS *dbproc, const char *fmt,...)
printf-like way to form SQL to send to the server.
Definition: dblib.c:1334
dbservcharset
char * dbservcharset(DBPROCESS *dbproc)
Get syscharset name of the server character set.
Definition: dblib.c:7023
tdsdaterec::year
TDS_INT year
year
Definition: tds.h:160
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:7300
tds_dstr_copy
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another
Definition: tdsstring.c:122
DBCOL2
Definition: sybdb.h:374
dbiscount
BOOL dbiscount(DBPROCESS *dbproc)
Indicates whether or not the count returned by dbcount is real (Microsoft-compatibility feature).
Definition: dblib.c:2804
dbnumalts
int dbnumalts(DBPROCESS *dbproc, int computeid)
Get count of columns in a compute row.
Definition: dblib.c:4940
DBTDS_UNKNOWN
#define DBTDS_UNKNOWN
DBTDS_xxx are returned by DBTDS() The integer values of the constants are poorly chosen.
Definition: sybdb.h:88
dbfirstrow
DBINT dbfirstrow(DBPROCESS *dbproc)
See if a server response has arrived.
Definition: dblib.c:7192
tds_quote_id
size_t tds_quote_id(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id.
Definition: query.c:2171
metadata_t
Definition: dbpivot.c:713
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:293
dboption
Definition: dblib.h:110
dbrows
RETCODE dbrows(DBPROCESS *dbproc)
Indicate whether a query returned rows.
Definition: dblib.c:4034
tds_column::column_scale
TDS_TINYINT column_scale
scale for decimal/numeric
Definition: tds.h:704
dbuse
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
Definition: dblib.c:1445
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:534
dbtds
int dbtds(DBPROCESS *dbproc)
Get the TDS version in use for dbproc.
Definition: dblib.c:6801
_dbresults
static RETCODE _dbresults(DBPROCESS *dbproc)
Definition: dblib.c:1703
dbrecftos
void dbrecftos(const char filename[])
Record to a file all SQL commands sent to the server.
Definition: dblib.c:6767
dbcolname
char * dbcolname(DBPROCESS *dbproc, int column)
Return name of a regular result column.
Definition: dblib.c:1872
dbaltlen
DBINT dbaltlen(DBPROCESS *dbproc, int computeid, int column)
Get size of data in compute column.
Definition: dblib.c:7137
tds_writetext_end
TDSRET tds_writetext_end(TDSSOCKET *tds)
Finish sending writetext data.
Definition: bulk.c:1202
DBDATETIME4
Definition: sybdb.h:301
TDS_DATETIMEALL
this structure is not directed connected to a TDS protocol but keeps any DATE/TIME information.
Definition: tds.h:146
dbretdata
BYTE * dbretdata(DBPROCESS *dbproc, int retnum)
Get value of an output parameter filled by a stored procedure.
Definition: dblib.c:4753
tdsoldmoney
Definition: proto.h:33
dblib_context
Definition: dblib.c:172
dbtxtimestamp
DBBINARY * dbtxtimestamp(DBPROCESS *dbproc, int column)
Get text timestamp for a column in the current row.
Definition: dblib.c:6527
tds_sybase_dbdaterec
Definition: sybdb.h:474
dbloginfree
void dbloginfree(LOGINREC *login)
free the LOGINREC
Definition: dblib.c:737
DBPROC_ROWBUF
Definition: dblib.h:52
tds_dstr_len
static size_t tds_dstr_len(const DSTR *s)
Returns the length of the string in bytes.
Definition: string.h:85
dbsetlname
RETCODE dbsetlname(LOGINREC *login, const char *value, int which)
Set the value of a string in a LOGINREC structure.
Definition: dblib.c:759
name_t
Definition: dbpivot.c:1275
DBCOL
Definition: sybdb.h:355
dbcurcmd
int dbcurcmd(DBPROCESS *dbproc)
Get number of the row just returned.
Definition: dblib.c:6220
tds_socket
Information for a server connection.
Definition: tds.h:1163
tds_dblib_dbprocess
Definition: dblib.h:123
dbcmdrow
RETCODE dbcmdrow(DBPROCESS *dbproc)
See if the current command can return rows.
Definition: dblib.c:4260
dbconvert
DBINT dbconvert(DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen)
cf.
Definition: dblib.c:2593
dbcount
DBINT dbcount(DBPROCESS *dbproc)
Get count of rows processed.
Definition: dblib.c:2824
DBLIB_ERROR_MESSAGE
struct _dblib_error_message DBLIB_ERROR_MESSAGE
tdsdatetime4
Definition: proto.h:56
dbnumcols
int dbnumcols(DBPROCESS *dbproc)
Return number of regular columns in a result set.
Definition: dblib.c:1848
tdsdaterec::minute
TDS_INT minute
0-59
Definition: tds.h:167
TDS_DONE_ERROR
@ TDS_DONE_ERROR
error occurred
Definition: tds.h:253
dbdata
BYTE * dbdata(DBPROCESS *dbproc, int column)
Get address of data in a regular result column.
Definition: dblib.c:3352
dbsetnull
RETCODE dbsetnull(DBPROCESS *dbproc, int bindtype, int bindlen, BYTE *bindval)
Define substitution values to be used when binding null values.
Definition: dblib.c:1962
tds_dblib_dbprocess::msdblib
int msdblib
boolean use ms behaviour
Definition: dblib.h:154
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
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
dbsprhead
RETCODE dbsprhead(DBPROCESS *dbproc, char *buffer, DBINT buf_len)
Print result set headings to a buffer.
Definition: dblib.c:3895
dbmny4copy
RETCODE dbmny4copy(DBPROCESS *dbproc, DBMONEY4 *src, DBMONEY4 *dest)
Copy a DBMONEY4 value.
Definition: dblib.c:5740
dbstrlen
int dbstrlen(DBPROCESS *dbproc)
Get size of the command buffer, in bytes.
Definition: dblib.c:6291
tds_process_tokens
TDSRET tds_process_tokens(TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag)
process all streams.
Definition: token.c:531
dbtypeinfo
Definition: sybdb.h:336
dbwillconvert
DBBOOL dbwillconvert(int srctype, int desttype)
Test whether or not a datatype can be converted to another datatype.
Definition: dblib.c:2874
dbgetrow
RETCODE dbgetrow(DBPROCESS *dbproc, DBINT row)
Read a row from the row buffer.
Definition: dblib.c:1930
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:793
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:965
col_t
Definition: dbpivot.c:77
tds_column::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:696
DBDATETIME
Definition: sybdb.h:295
tds_context
Definition: tds.h:1029
dbfreebuf
void dbfreebuf(DBPROCESS *dbproc)
Erase the command buffer, in case DBNOAUTOFREE was set with dbsetopt().
Definition: dblib.c:6060
dbspr1rowlen
DBINT dbspr1rowlen(DBPROCESS *dbproc)
Determine size buffer required to hold the results returned by dbsprhead(), dbsprline(),...
Definition: dblib.c:3419
dbadlen
DBINT dbadlen(DBPROCESS *dbproc, int computeid, int column)
Get size of data in a compute column.
Definition: dblib.c:4310
tdsnumeric
Definition: proto.h:26
dbisopt
DBBOOL dbisopt(DBPROCESS *dbproc, int option, const char param[])
Get value of an option.
Definition: dblib.c:6163
dbsetllong
RETCODE dbsetllong(LOGINREC *login, long value, int which)
Set an integer value in a LOGINREC structure.
Definition: dblib.c:825
dbcanquery
RETCODE dbcanquery(DBPROCESS *dbproc)
Cancel the query currently being retrieved, discarding all pending rows.
Definition: dblib.c:6031
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:4631
tds_login
Definition: tds.h:517
dbstrcpy
RETCODE dbstrcpy(DBPROCESS *dbproc, int start, int numbytes, char *dest)
Get a copy of a chunk of the command buffer.
Definition: dblib.c:6342
TDS_DONE_MORE_RESULTS
@ TDS_DONE_MORE_RESULTS
more results follow
Definition: tds.h:252
dbaltop
int dbaltop(DBPROCESS *dbproc, int computeid, int column)
Get aggregation operator for a compute column.
Definition: dblib.c:4444
dblogin
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
Definition: dblib.c:705
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:6594
dbperror
int dbperror(DBPROCESS *dbproc, DBINT msgno, long errnum,...)
Call client-installed error handler.
Definition: dblib.c:8127
tds_willconvert
unsigned char tds_willconvert(int srctype, int desttype)
Test if a conversion is possible.
Definition: convert.c:3106
tds_dstr_buf
static char * tds_dstr_buf(DSTR *s)
Returns a buffer to edit the string.
Definition: string.h:71
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:396
dbgetmaxprocs
int dbgetmaxprocs(void)
get maximum simultaneous connections db-lib will open to the server.
Definition: dblib.c:4171