error_table.h
{ SYBEICONVI, EXINFO, "WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?')."},
{ SYBEICONVO, EXUSER, "Error converting client characters into server's character set. Some character(s) could not be converted."},
{ SYBEAAMT, EXPROGRAM, "User attempted a dbaltbind() with mismatched column and variable types."},
{ SYBEABMT, EXPROGRAM, "User attempted a dbbind() with mismatched column and variable types."},
{ SYBEABNC, EXPROGRAM, "Attempt to bind to a non-existent column."},
{ SYBEABNP, EXPROGRAM, "Attempt to bind using NULL pointers."},
{ SYBEABNV, EXPROGRAM, "Attempt to bind to a NULL program variable."},
{ SYBEACNV, EXCONVERSION, "Attemp to do conversion with NULL destination variable."},
{ SYBEADST, EXCONSISTENCY, "Error in attempting to determine the size of a pair of translation tables."},
{ SYBEAICF, EXCONSISTENCY, "Error in attempting to install custom format."},
{ SYBEALTT, EXCONSISTENCY, "Error in attempting to load a pair of translation tables."},
{ SYBEAOLF, EXRESOURCE, "Error in attempting to open a localization file."},
{ SYBEAPCT, EXCONSISTENCY, "Error in attempting to perform a character-set translation."},
{ SYBEAPUT, EXPROGRAM, "Attempt to print unknown token."},
{ SYBEARDI, EXRESOURCE, "Error in attempting to read datetime information from a localization file."},
{ SYBEARDL, EXRESOURCE, "Error in attempting to read the dblib.loc localization file."},
{ SYBEASEC, EXPROGRAM, "Attempt to send an empty command buffer to the SQL Server."},
{ SYBEASNL, EXPROGRAM, "Attempt to set fields in a null loginrec."},
{ SYBEASTF, 1, "VMS: Unable to setmode for control_c ast."},
{ SYBEASTL, EXPROGRAM, "Synchronous IO attempted at AST level."},
{ SYBEASUL, EXPROGRAM, "Attempt to set unknown loginrec field."},
{ SYBEATTNACK, 1, "Timed out waiting for server to acknowledge attention."},
{ SYBEAUTN, EXPROGRAM, "Attempt to update the timestamp of a table which has no timestamp column."},
{ SYBEBADPK, EXINFO, "Packet size of %1! not supported. -- size of %2! used instead."},
{ SYBEBADTYPE, 1, "Illegal value for type parameter given to %1!."},
{ SYBEBBCI, EXINFO, "Batch successfully bulk-copied to SQL Server."},
{ SYBEBBFL, 1, "-001- Batch failed in bulk-copy to SQL Server."},
{ SYBEBBL, EXPROGRAM, "Bad bindlen parameter passed to dbsetnull()."},
{ SYBEBCBC, EXPROGRAM, "bcp_columns() must be called before bcp_colfmt() and bcp_colfmt_ps()."},
{ SYBEBCBNPR, EXPROGRAM, "bcp_bind(): if varaddr is NULL, prefixlen must be 0 and no terminator should be specified."},
{ 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."},
{ SYBEBCBPREF, EXPROGRAM, "Illegal prefix length. Legal values are 0, 1, 2 or 4."},
{ SYBEBCFO, EXUSER, "Bcp host-files must contain at least one column."},
{ SYBEBCHLEN, EXPROGRAM, "host_collen should be greater than or equal to -1."},
{ SYBEBCIS, EXCONSISTENCY, "Attempt to bulk-copy an illegally-sized column value to the SQL Server."},
{ SYBEBCIT, EXPROGRAM, "It's illegal to use BCP terminators with program variables other than SYBCHAR, SYBBINARY, SYBTEXT, or SYBIMAGE."},
{ SYBEBCITBLEN, EXPROGRAM, "bcp_init(): tblname parameter is too long."},
{ SYBEBCITBNM, EXPROGRAM, "bcp_init(): tblname parameter cannot be NULL."},
{ SYBEBCMTXT, EXPROGRAM, "bcp_moretext() may be used only when there is at least one text or image column in the server table."},
{ SYBEBCNL, EXNONFATAL, "Negative length-prefix found in BCP data-file."},
{ SYBEBCNN, EXUSER, "Attempt to bulk-copy a NULL value into Server column 0, which does not accept NULL values."},
{ SYBEBCNT, EXUSER, "Attempt to use Bulk Copy with a non-existent Server table."},
{ SYBEBCOR, EXCONSISTENCY, "Attempt to bulk-copy an oversized row to the SQL Server."},
{ 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."},
{ SYBEBCPCTYP, EXPROGRAM, "bcp_colfmt(): If table_colnum is 0, host_type cannot be 0."},
{ SYBEBCPI, EXPROGRAM, "bcp_init() must be called before any other bcp routines."},
{ 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."},
{ SYBEBCPOPT, 1, "The option cannot be called while a bulk copy operation is progress."},
{ SYBEBCPREC, EXNONFATAL, "Column %1!: Illegal precision value encountered."},
{ SYBEBCPREF, EXPROGRAM, "Illegal prefix length. Legal values are -1, 0, 1, 2 or 4."},
{ SYBEBCRE, EXNONFATAL, "IO error while reading bcp data-file."},
{ SYBEBCRO, EXINFO, "The BCP hostfile '' contains only 0 rows. It was impossible to read the requested 0 rows."},
{ SYBEBCSA, EXUSER, "The BCP hostfile '' contains only 0 rows. Skipping all of these rows is not allowed."},
{ SYBEBCSET, EXCONSISTENCY, "Unknown character-set encountered."},
{ SYBEBCSI, EXPROGRAM, "Host-file columns may be skipped only when copying INto the Server."},
{ SYBEBCSNDROW, EXPROGRAM, "bcp_sendrow() may NOT be called unless all text data for the previous row has been sent using bcp_moretext()."},
{ 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."},
{ SYBEBCUC, EXRESOURCE, "Bcp: Unable to close host data-file."},
{ SYBEBCUO, EXRESOURCE, "Bcp: Unable to open host data-file."},
{ SYBEBCVH, EXPROGRAM, "bcp_exec() may be called only after bcp_init() has been passed a valid host file."},
{ SYBEBCVLEN, EXPROGRAM, "varlen should be greater than or equal to -1."},
{ SYBEBCWE, EXNONFATAL, "IO error while writing bcp data-file."},
{ SYBEBDIO, EXPROGRAM, "Bad bulk-copy direction. Must be either IN or OUT."},
{ SYBEBEOF, EXNONFATAL, "Unexpected EOF encountered in BCP data-file."},
{ SYBEBIHC, EXPROGRAM, "Incorrect host-column number found in bcp format-file."},
{ SYBEBIVI, EXPROGRAM, "bcp_columns(), bcp_colfmt() and bcp_colfmt_ps() may be used only after bcp_init() has been passed a valid input file."},
{ SYBEBNCR, EXPROGRAM, "Attempt to bind user variable to a non-existent compute row."},
{ SYBEBNUM, EXPROGRAM, "Bad numbytes parameter passed to dbstrcpy()."},
{ SYBEBOOL, 1, "Boolean parameters must be TRUE or FALSE."},
{ SYBEBPKS, EXPROGRAM, "In DBSETLPACKET(), the packet size parameter must be between 0 and 999999."},
{ SYBEBPREC, EXPROGRAM, "Illegal precision specified."},
{ SYBEBPROBADDEF, EXCONSISTENCY, "bcp protocol error: illegal default column id received."},
{ SYBEBPROBADLEN, 1, "bcp protocol error: illegal datatype length received."},
{ SYBEBPROBADPREC, 1, "bcp protocol error: illegal precision value received."},
{ SYBEBPROBADSCL, 1, "bcp protocol error: illegal scale value received."},
{ SYBEBPROBADTYP, 1, "bcp protocol error: unknown column datatype."},
{ SYBEBPROCOL, EXCONSISTENCY, "bcp protocol error: returned column count differs from the actual number of columns received."},
{ SYBEBPRODEF, EXCONSISTENCY, "bcp protocol error: expected default information and got none."},
{ SYBEBPRODEFID, EXCONSISTENCY, "bcp protocol error: default column id and actual column id are not same."},
{ SYBEBPRODEFTYP, EXCONSISTENCY, "bcp protocol error: default value datatype differs from column datatype."},
{ SYBEBPROEXTDEF, EXCONSISTENCY, "bcp protocol error: more than one row of default information received."},
{ SYBEBPROEXTRES, EXCONSISTENCY, "bcp protocol error: unexpected set of results received."},
{ SYBEBPRONODEF, EXCONSISTENCY, "bcp protocol error: default value received for column that does not have default."},
{ SYBEBPRONUMDEF, EXCONSISTENCY, "bcp protocol error: expected number of defaults differs from the actual number of defaults received."},
{ SYBEBRFF, EXRESOURCE, "IO error while reading bcp format-file."},
{ SYBEBSCALE, EXPROGRAM, "Illegal scale specified."},
{ SYBEBTMT, EXPROGRAM, "Attempt to send too much TEXT data via the bcp_moretext() call."},
{ SYBEBTOK, EXCOMM, "Bad token from SQL Server: Data-stream processing out of sync."},
{ SYBEBTYP, EXPROGRAM, "Unknown bind type passed to DB-LIBRARY function."},
{ SYBEBTYPSRV, EXPROGRAM, "Datatype is not supported by the server."},
{ SYBEBUCE, EXRESOURCE, "Bcp: Unable to close error-file."},
{ SYBEBUCF, EXPROGRAM, "Bcp: Unable to close format-file."},
{ SYBEBUDF, EXPROGRAM, "Bcp: Unrecognized datatype found in format-file."},
{ SYBEBUFF, EXPROGRAM, "Bcp: Unable to create format-file."},
{ SYBEBUFL, EXCONSISTENCY, "DB-LIBRARY internal error - send buffer length corrupted."},
{ SYBEBUOE, EXRESOURCE, "Bcp: Unable to open error-file."},
{ SYBEBUOF, EXPROGRAM, "Bcp: Unable to open format-file."},
{ SYBEBWEF, EXNONFATAL, "IO error while writing bcp error-file."},
{ SYBEBWFF, EXRESOURCE, "IO error while writing bcp format-file."},
{ SYBECAP, EXCOMM, "DB-Library capabilities not accepted by the Server."},
{ SYBECAPTYP, EXCOMM, "Unexpected capability type in CAPABILITY datastream."},
{ SYBECDNS, EXCONSISTENCY, "Datastream indicates that a compute column is derived from a non-existent select-list member."},
{ SYBECDOMAIN, EXCONVERSION, "Source field value is not within the domain of legal values."},
{ SYBECINTERNAL, EXCONVERSION, "Internal Conversion error."},
{ SYBECLOS, EXCOMM, "Error in closing network connection."},
{ SYBECLOSEIN, 1, "Unable to close interface file."},
{ SYBECLPR, EXCONVERSION, "Data-conversion resulted in loss of precision."},
{ SYBECNOR, EXPROGRAM, "Column number out of range."},
{ SYBECNOV, EXCONVERSION, "Attempt to set variable to NULL resulted in overflow."},
{ SYBECOFL, EXCONVERSION, "Data-conversion resulted in overflow."},
{ SYBECONN, EXCOMM, "Unable to connect socket -- SQL Server is unavailable or does not exist."},
{ 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."},
{ SYBECRSAGR, EXPROGRAM, "Aggregate functions are not allowed in a cursor statement."},
{ SYBECRSBROL, EXPROGRAM, "Backward scrolling cannot be used in a forward scrolling cursor."},
{ SYBECRSBSKEY, EXPROGRAM, "Keyset cannot be scrolled backward in mixed cursors with a previous fetch type."},
{ SYBECRSBUFR, EXPROGRAM, "Row buffering should not be turned on when using cursor APIs."},
{ SYBECRSDIS, EXPROGRAM, "Cursor statement contains one of the disallowed phrases 'compute', 'union', 'for browse', or 'select into'."},
{ SYBECRSFLAST, EXPROGRAM, "Fetch type LAST requires fully keyset driven cursors."},
{ SYBECRSFRAND, EXPROGRAM, "Fetch types RANDOM and RELATIVE can only be used within the keyset of keyset driven cursors."},
{ SYBECRSFROWN, EXPROGRAM, "Row number to be fetched is outside valid range."},
{ SYBECRSFTYPE, EXRESOURCE, "Unknown fetch type."},
{ SYBECRSINV, EXPROGRAM, "Invalid cursor statement."},
{ SYBECRSINVALID, EXRESOURCE, "The cursor handle is invalid."},
{ SYBECRSMROWS, EXRESOURCE, "Multiple rows are returned, only one is expected."},
{ SYBECRSNOBIND, EXPROGRAM, "Cursor bind must be called prior to updating cursor."},
{ SYBECRSNOCOUNT, EXPROGRAM, "The DBNOCOUNT option should not be turned on when doing updates or deletes with dbcursor()."},
{ SYBECRSNOFREE, EXPROGRAM, "The DBNOAUTOFREE option should not be turned on when using cursor APIs."},
{ SYBECRSNOIND, EXPROGRAM, "One of the tables involved in the cursor statement does not have a unique index."},
{ SYBECRSNOKEYS, EXRESOURCE, "The entire keyset must be defined for KEYSET cursors."},
{ SYBECRSNOLEN, EXRESOURCE, "No unique index found."},
{ SYBECRSNOPTCC, EXRESOURCE, "No OPTCC was found."},
{ SYBECRSNORDER, EXRESOURCE, "The order of clauses must be from, where, and order by."},
{ SYBECRSNORES, EXPROGRAM, "Cursor statement generated no results."},
{ SYBECRSNOTABLE, EXRESOURCE, "Table name is NULL."},
{ SYBECRSNOUPD, EXPROGRAM, "Update or delete operation did not affect any rows."},
{ SYBECRSNOWHERE, EXPROGRAM, "A WHERE clause is not allowed in a cursor update or insert."},
{ SYBECRSNROWS, EXRESOURCE, "No rows returned, at least one is expected."},
{ SYBECRSNUNIQUE, EXRESOURCE, "No unique keys associated with this view."},
{ SYBECRSORD, EXPROGRAM, "Only fully keyset driven cursors can have 'order by', ' group by', or 'having' phrases."},
{ SYBECRSRO, EXPROGRAM, "Data locking or modifications cannot be made in a READONLY cursor."},
{ SYBECRSSET, EXPROGRAM, "A SET clause is required for a cursor update or insert."},
{ SYBECRSTAB, EXPROGRAM, "Table name must be determined in operations involving data locking or modifications."},
{ SYBECRSUPDNB, EXPROGRAM, "Update or insert operations cannot use bind variables when binding type is NOBIND."},
{ SYBECRSUPDTAB, EXPROGRAM, "Update or insert operations using bind variables require single table cursors."},
{ SYBECRSVAR, EXRESOURCE, "There is no valid address associated with this bind."},
{ SYBECRSVIEW, EXPROGRAM, "A view cannot be joined with another table or a view in a cursor statement."},
{ SYBECRSVIIND, EXPROGRAM, "The view used in the cursor statement does not include all the unique index columns of the underlying tables."},
{ SYBECS, 1, "-004- cs context Error."},
{ SYBECSYN, EXCONVERSION, "Attempt to convert data stopped by syntax error in source field."},
{ SYBECUFL, EXCONVERSION, "Data-conversion resulted in underflow."},
{ SYBECWLL, 1, "Attempt to set column width less than 1."},
{ SYBEDBPS, EXRESOURCE, "Maximum number of DBPROCESSes already allocated."},
{ SYBEDCL, 1, "-004- DCL Error."},
{ SYBEDDNE, EXCOMM, "DBPROCESS is dead or not enabled."},
{ SYBEDIVZ, EXUSER, "Attempt to divide by $0.00 in function %1!."},
{ SYBEDNTI, EXPROGRAM, "Attempt to use dbtxtsput() to put a new text-timestamp into a column whose datatype is neither SYBTEXT nor SYBIMAGE."},
{ SYBEDPOR, EXPROGRAM, "Out-of-range datepart constant."},
{ SYBEDVOR, EXPROGRAM, "Day values must be between 1 and 7."},
{ SYBEECAN, EXINFO, "Attempted to cancel unrequested event notification."},
{ SYBEECRT, 1, "Must call dbregdefine() before dbregcreate()."},
{ SYBEEINI, EXINFO, "Must call dbreginit() before dbregraise()."},
{ SYBEEQVA, 1, "Error in queueing VMS AST routine."},
{ SYBEERRLABEL, 1, "An illegal value was returned from the security label handler."},
{ SYBEESSL, 1, "Login security level entered does not agree with operating system level."},
{ SYBEETD, EXPROGRAM, "Failure to send the expected amount of TEXT or IMAGE data via dbmoretext()."},
{ SYBEEUNR, EXCOMM, "Unsolicited event notification received."},
{ SYBEEVOP, EXINFO, "Called dbregwatch() with a bad options parameter."},
{ SYBEEVST, EXINFO, "Must initiate a transaction before calling dbregparam()."},
{ SYBEFCON, EXCOMM, "SQL Server connection failed."},
{ SYBEFENC, 1, "Password Encryption failed."},
{ 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."},
{ SYBEFMODE, 1, "ReadWriteAppend mode denied on file."},
{ SYBEFRES, EXFATAL, "Challenge-Response function failed."},
{ SYBEFSHD, EXRESOURCE, "Error in attempting to find the Sybase home directory."},
{ SYBEFUNC, EXPROGRAM, "Functionality not supported at the specified version level."},
{ SYBEGENOS, 1, "General Operating System Error."},
{ SYBEICN, EXPROGRAM, "Invalid computeid or compute column number."},
{ SYBEIDCL, EXCONSISTENCY, "Illegal datetime column length returned by DataServer. Legal datetime lengths are 4 and 8 bytes."},
{ SYBEIDECCL, EXCONSISTENCY, "Invalid decimal column length returned by the server."},
{ SYBEIFCL, EXCONSISTENCY, "Illegal floating-point column length returned by DataServer. Legal floating-point lengths are 4 and 8 bytes."},
{ SYBEIFNB, EXPROGRAM, "Illegal field number passed to bcp_control()."},
{ SYBEIICL, EXCONSISTENCY, "Illegal integer column length returned by SQL Server. Legal integer lengths are 1, 2, and 4 bytes."},
{ SYBEIMCL, EXCONSISTENCY, "Illegal money column length returned by DataServer. Legal money lengths are 4 and 8 bytes."},
{ SYBEINLN, EXUSER, "Interface file: unexpected end-of-line."},
{ SYBEINTF, EXUSER, "Server name not found in interface file."},
{ SYBEINUMCL, EXCONSISTENCY, "Invalid numeric column length returned by the server."},
{ SYBEIPV, EXINFO, "%1! is an illegal value for the %2! parameter of %3!."},
{ SYBEISOI, EXCONSISTENCY, "Invalid sort-order information found."},
{ SYBEISRVPREC, EXCONSISTENCY, "Illegal precision value returned by the server."},
{ SYBEISRVSCL, EXCONSISTENCY, "Illegal scale value returned by the server."},
{ SYBEITIM, EXPROGRAM, "Illegal timeout value specified."},
{ SYBEIVERS, EXPROGRAM, "Illegal version level specified."},
{ SYBEKBCI, EXINFO, "Bcp: 1000 rows sent to SQL Server."},
{ SYBEKBCO, EXINFO, "1000 rows successfully bulk-copied to host-file."},
{ SYBELBLEN, 1, "Security labels should be less than 256 characters long."},
{ SYBEMEM, EXRESOURCE, "Unable to allocate sufficient memory."},
{ SYBEMOV, EXUSER, "Money arithmetic resulted in overflow in function %1!."},
{ SYBEMPLL, EXUSER, "Attempt to set maximum number of DBPROCESSes lower than 1."},
{ SYBEMVOR, EXPROGRAM, "Month values must be between 1 and 12."},
{ SYBENBUF, EXINFO, "called dbsendpassthru() with a NULL buf pointer."},
{ SYBENBVP, EXPROGRAM, "Cannot pass dbsetnull() a NULL bindval pointer."},
{ SYBENDC, EXPROGRAM, "Cannot have negative component in date in numeric form."},
{ SYBENDTP, EXPROGRAM, "Called dbdatecrack() with a NULL datetime parameter."},
{ SYBENEG, EXCOMM, "Negotiated login attempt failed."},
{ SYBENEHA, 1, "Called dbreghandle() with a NULL handler parameter."},
{ SYBENHAN, EXINFO, "called dbrecvpassthru() with a NULL handler parameter."},
{ SYBENLNL, 1, "Program not linked with specified network library."},
{ SYBENMOB, EXPROGRAM, "No such member of 'order by' clause."},
{ SYBENOEV, EXINFO, "dbpoll() cannot be called if registered procedure notifications have been disabled."},
{ SYBENOTI, 1, "No event handler installed."},
{ SYBENOVALUE, 1, "Security labels require both a name and a value."},
{ SYBENPRM, EXPROGRAM, "NULL parameter not allowed for this dboption."},
{ SYBENSIP, EXPROGRAM, "Negative starting index passed to dbstrcpy()."},
{ SYBENTLL, EXUSER, "Name too long for loginrec field."},
{ SYBENTST, 1, "The file being opened must be a stream_lf."},
{ SYBENTTN, EXPROGRAM, "Attempt to use dbtxtsput() to put a new text-timestamp into a non-existent data row."},
{ SYBENULL, EXINFO, "NULL DBPROCESS pointer passed to DB-Library."},
{ SYBENULP, EXPROGRAM, "Called with a NULL parameter."},
{ SYBENUM, 1, "Incorrect number of arguments given to DB-Library."},
{ SYBENXID, EXNONFATAL, "The Server did not grant us a distributed-transaction ID."},
{ SYBEONCE, EXPROGRAM, "Function can be called only once."},
{ SYBEOOB, EXCOMM, "Error in sending out-of-band data to SQL Server."},
{ SYBEOPIN, EXNONFATAL, "Could not open interface file."},
{ SYBEOPNA, EXNONFATAL, "The textimage facility is available only when using a SQL Server whose version number is 4.0 or greater."},
{ SYBEOPTNO, 1, "Option is not allowed or is unreconized."},
{ 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."},
{ SYBEORPF, EXUSER, "Attempt to set remote password would overflow the login-record's remote-password field."},
{ SYBEOSSL, 1, "Operating system login level not in range of Secure SQL Server."},
{ SYBEPAGE, 1, "wrong resource type or length given for dbpage() operation."},
{ SYBEPOLL, EXINFO, "Only one dbpoll() can be active at a time."},
{ SYBEPRTF, EXINFO, "dbtracestring() may only be called from a printfunc()."},
{ SYBEPWD, EXUSER, "Incorrect password."},
{ SYBERDCN, EXCONVERSION, "Requested data-conversion does not exist."},
{ SYBERDNR, EXPROGRAM, "Attempt to retrieve data from a non-existent row."},
{ SYBEREAD, EXCOMM, "Read from SQL Server failed."},
{ SYBERESP, EXPROGRAM, "Response function address passed to dbresponse() must be non-NULL."},
{ SYBERFILE, 1, "Can not open resource file."},
{ SYBERPCS, EXINFO, "Must call dbrpcinit() before dbrpcparam()."},
{ SYBERPIL, EXPROGRAM, "It is illegal to pass -1 to dbrpcparam() for the datalen of parameters which are of type SYBCHAR, SYBVARCHAR, SYBBINARY, or SYBVARBINARY."},
{ SYBERPNA, EXNONFATAL, "The RPC facility is available only when using a SQL Server whose version number is 4.0 or greater."},
{ SYBERPND, EXPROGRAM, "Attempt to initiate a new SQL Server operation with results pending."},
{ SYBERPNULL, EXPROGRAM, "value parameter for dbprcparam() can be NULL, only if the datalen parameter is 0."},
{ SYBERPTXTIM, EXPROGRAM, "RPC parameters cannot be of type TextImage."},
{ 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."},
{ SYBERTCC, EXPROGRAM, "dbreadtext() may not be used to receive the results of a query which contains a COMPUTE clause."},
{ SYBERTSC, EXPROGRAM, "dbreadtext() may only be used to receive the results of a query which contains a single result column."},
{ SYBERTYPE, 1, "Invalid resource type given to DB-Library."},
{ SYBERXID, EXNONFATAL, "The Server did not recognize our distributed-transaction ID."},
{ SYBESECURE, EXPROGRAM, "Secure Server function not supported in this version."},
{ SYBESEFA, EXPROGRAM, "DBSETNOTIFS cannot be called if connections are present."},
{ SYBESEOF, EXCOMM, "Unexpected EOF from SQL Server."},
{ SYBESFOV, EXPROGRAM, "dbsafestr() overflowed its destination buffer."},
{ SYBESLCT, 1, "Could not select or copy field specified."},
{ SYBESMSG, EXSERVER, "General SQL Server error: Check messages from the SQL Server."},
{ SYBESOCK, EXCOMM, "Unable to open socket."},
{ SYBESPID, EXPROGRAM, "Called dbspid() with a NULL dbproc."},
{ SYBESYNC, EXCOMM, "Read attempted while out of synchronization with SQL Server."},
{ SYBETEXS, EXINFO, "Called dbmoretext() with a bad size parameter."},
{ SYBETIME, EXTIME, "SQL Server connection timed out."},
{ SYBETMCF, EXPROGRAM, "Attempt to install too many custom formats via dbfmtinstall()."},
{ SYBETMTD, EXPROGRAM, "Attempt to send too much TEXT data via the dbmoretext() call."},
{ SYBETPAR, EXPROGRAM, "No SYBTEXT or SYBIMAGE parameters were defined."},
{ SYBETPTN, EXUSER, "Syntax error: only two periods are permitted in table names."},
{ SYBETRAC, EXINFO, "Attempted to turn off a trace flag that was not on."},
{ SYBETRAN, EXINFO, "DBPROCESS is being used for another transaction."},
{ SYBETRAS, EXINFO, "DB-Library internal error - trace structure not found."},
{ SYBETRSN, EXINFO, "Bad numbytes parameter passed to dbtracestring()."},
{ SYBETSIT, EXINFO, "Attempt to call dbtsput() with an invalid timestamp."},
{ 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."},
{ SYBETYPE, EXINFO, "Invalid argument type given to DB-Library."},
{ SYBEUACS, 1, "VMS: Unable to assign channel to sys$command."},
{ SYBEUAVE, 1, "Unable to allocate VMS event flag."},
{ SYBEUCPT, EXUSER, "Unrecognized custom-format parameter-type encountered in dbstrbuild()."},
{ SYBEUCRR, EXCONSISTENCY, "Internal software error: Unknown connection result reported by dbpasswd()."},
{ SYBEUDTY, EXCONSISTENCY, "Unknown datatype encountered."},
{ SYBEUFDS, EXUSER, "Unrecognized format encountered in dbstrbuild()."},
{ SYBEUFDT, EXCONSISTENCY, "Unknown fixed-length datatype encountered."},
{ SYBEUHST, EXUSER, "Unknown host machine name."},
{ SYBEUMSG, EXCOMM, "Unknown message-id in MSG datastream."},
{ SYBEUNAM, EXFATAL, "Unable to get current username from operating system."},
{ SYBEUNOP, EXNONFATAL, "Unknown option passed to dbsetopt()."},
{ SYBEUNT, EXUSER, "Unknown network type found in interface file."},
{ SYBEURCI, EXRESOURCE, "Unable to read copyright information from the dblib localization file."},
{ SYBEUREI, EXRESOURCE, "Unable to read error information from the dblib localization file."},
{ SYBEUREM, EXRESOURCE, "Unable to read error mnemonic from the dblib localization file."},
{ SYBEURES, EXRESOURCE, "Unable to read error string from the dblib localization file."},
{ SYBEURMI, EXRESOURCE, "Unable to read money-format information from the dblib localization file."},
{ SYBEUSCT, EXCOMM, "Unable to set communications timer."},
{ SYBEUTDS, EXCOMM, "Unrecognized TDS version received from SQL Server."},
{ SYBEUVBF, EXPROGRAM, "Attempt to read an unknown version of BCP format-file."},
{ SYBEUVDT, EXCONSISTENCY, "Unknown variable-length datatype encountered."},
{ SYBEVDPT, EXUSER, "For bulk copy, all variable-length data must have either a length-prefix or a terminator specified."},
{ SYBEVMS, 1, "Sendflush: VMS IO error."},
{ SYBEVOIDRET, 1, "Parameter of type SYBVOID cannot be a return parameter."},
{ SYBEWAID, EXCONSISTENCY, "DB-LIBRARY internal error: ALTFMT following ALTNAME has wrong id."},
{ SYBEWRIT, EXCOMM, "Write to SQL Server failed."},
{ SYBEXOCI, EXNONFATAL, "A character-set translation overflowed its destination buffer while using bcp to copy data from a host-file to the SQL Server."},
{ SYBEXTDN, EXPROGRAM, "Warning: the xlt_todisp parameter to dbfree_xlate() was NULL. The space associated with the xlt_tosrv parameter has been freed."},
{ SYBEXTN, EXPROGRAM, "The xlt_todisp and xlt_tosrv parameters to dbfree_xlate() were NULL."},
{ SYBEXTSN, EXPROGRAM, "Warning: the xlt_tosrv parameter to dbfree_xlate() was NULL. The space associated with the xlt_todisp parameter has been freed."},
{ SYBEZTXT, EXINFO, "Attempt to send zero length TEXT or IMAGE to dataserver via dbwritetext()."},
{ 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
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. dbconvert_ps(), above
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:227
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:1156
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:1173
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:1118
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. Non-blocking, does not wait for a response.
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