View Javadoc
1 // 2 // Copyright 1998 CDS Networks, Inc., Medford Oregon 3 // 4 // All rights reserved. 5 // 6 // Redistribution and use in source and binary forms, with or without 7 // modification, are permitted provided that the following conditions are met: 8 // 1. Redistributions of source code must retain the above copyright 9 // notice, this list of conditions and the following disclaimer. 10 // 2. Redistributions in binary form must reproduce the above copyright 11 // notice, this list of conditions and the following disclaimer in the 12 // documentation and/or other materials provided with the distribution. 13 // 3. All advertising materials mentioning features or use of this software 14 // must display the following acknowledgement: 15 // This product includes software developed by CDS Networks, Inc. 16 // 4. The name of CDS Networks, Inc. may not be used to endorse or promote 17 // products derived from this software without specific prior 18 // written permission. 19 // 20 // THIS SOFTWARE IS PROVIDED BY CDS NETWORKS, INC. ``AS IS'' AND 21 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 // ARE DISCLAIMED. IN NO EVENT SHALL CDS NETWORKS, INC. BE LIABLE 24 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 // SUCH DAMAGE. 31 // 32 33 34 package com.internetcds.jdbc.tds; 35 36 37 38 /*** 39 * constants from the 4.2 TDS protocol 40 * 41 * @version $Id: TdsDefinitions.html,v 1.1 2003/05/12 16:19:44 sinisa Exp $ 42 * @author Craig Spannring 43 * @author The FreeTDS project. 44 */ 45 interface TdsDefinitions 46 { 47 public static final String cvsVersion = "$Id: TdsDefinitions.html,v 1.1 2003/05/12 16:19:44 sinisa Exp $"; 48 49 // 50 // Define the type of database the driver is connection to. 51 // 52 public static final int SQLSERVER = 1; 53 public static final int SYBASE = 2; 54 55 // 56 // Versions of the TDS protocol. Keep the values in order so code 57 // can recognize versions at or after a specified version. 58 // 59 public static final int TDS42 = 42; 60 public static final int TDS50 = 50; 61 public static final int TDS70 = 70; 62 63 // 64 // Sub packet types 65 // 66 static final byte TDS_RET_STAT_TOKEN = (byte)0x79; // 121 67 static final byte TDS_PROCID = (byte)0x7C; // 124 TDS_PROCID 68 static final byte TDS7_RESULT_TOKEN = (byte)129; // 0x81 TDS 7.0 only 69 static final byte TDS_COL_NAME_TOKEN = (byte)0xA0; // 160 TDS 4.2 only 70 static final byte TDS_COL_INFO_TOKEN = (byte)161; // 0xA1 TDS 4.2 only 71 static final byte TDS_TABNAME = (byte)164; // 0xA4 72 static final byte TDS_UNKNOWN_0xA5 = (byte)0xA5; // 0xA5 73 static final byte TDS_UNKNOWN_0xA7 = (byte)0xA7; // 74 static final byte TDS_UNKNOWN_0xA8 = (byte)0xA8; // 75 static final byte TDS_ORDER = (byte)169; // 0xA9 TDS_ORDER 76 static final byte TDS_ERR_TOKEN = (byte)170; // 0xAA 77 static final byte TDS_MSG_TOKEN = (byte)171; // 0xAB 78 static final byte TDS_TEXT_UPD_TOKEN = (byte)172; // 0xAC write- updatetext 79 static final byte TDS_LOGIN_ACK_TOKEN = (byte)173; // 0xAD 80 static final byte TDS_CONTROL = (byte)174; // 0xAE TDS_CONTROL 81 static final byte TDS_ROW_TOKEN = (byte)209; // 0xD1 82 static final byte TDS_UNKNOWN_0xE2 = (byte)226; // 0xE2 83 static final byte TDS_ENV_CHG_TOKEN = (byte)227; // 0xE3 84 static final byte TDS_MSG50_TOKEN = (byte)229; // 0xE5 85 static final byte TDS_RESULT_TOKEN = (byte)238; // 0xEE 86 static final byte TDS_END_TOKEN = (byte)253; // 0xFD TDS_DONE 87 static final byte TDS_DONEPROC = (byte)254; // 0xFE TDS_DONEPROC 88 static final byte TDS_DONEINPROC = (byte)255; // 0xFF TDS_DONEINPROC 89 // end of sub packet types 90 91 92 93 // 94 // Native Column types 95 // 96 static final byte SYBVOID = 31; // 0x1F 97 static final byte SYBIMAGE = 34; // 0x22 98 static final byte SYBTEXT = 35; // 0x23 99 static final byte SYBVARBINARY = 37; // 0x25 100 static final byte SYBINTN = 38; // 0x26 101 static final byte SYBVARCHAR = 39; // 0x27 102 static final byte SYBBINARY = 45; // 0x2D 103 static final byte SYBCHAR = 47; // 0x2F 104 static final byte SYBINT1 = 48; // 0x30 105 static final byte SYBBIT = 50; // 0x32 106 static final byte SYBINT2 = 52; // 0x34 107 static final byte SYBINT4 = 56; // 0x38 108 static final byte SYBDATETIME4 = 58; // 0x3A 109 static final byte SYBREAL = 59; // 0x3B 110 static final byte SYBMONEY = 60; // 0x3C (does not allow nulls?) 111 static final byte SYBDATETIME = 61; // 0x3D 112 static final byte SYBFLT8 = 62; // 0x3E 113 static final byte SYBNTEXT = 99; // 0x63 114 static final byte SYBNVARCHAR = 103; // 0x67 115 static final byte SYBBITN = 104; // 0x68 116 static final byte SYBDECIMAL = 106; // 0x6A 117 static final byte SYBNUMERIC = 108; // 0x6C 118 static final byte SYBFLTN = 109; // 0x6D 119 static final byte SYBMONEYN = 110; // 0x6E 120 static final byte SYBDATETIMN = 111; // 0x6F 121 static final byte SYBMONEY4 = 112; // 0x70 122 static final byte SYBNCHAR = -17; // 0xEF 123 // XXX should SYBMONEY4 be 122 instead of 112? 124 static final byte SYBSMALLMONEY = 122; // 0x7A 125 // end of column types 126 }

This page automatically generated by Maven