1 33 34 package com.internetcds.jdbc.tds; 35 36 import java.sql.*; 37 38 public class TdsUtil 39 { 40 public static final String cvsVersion = "$Id: TdsUtil.java,v 1.1 2006/06/23 10:39:30 sinisa Exp $"; 41 42 43 static public String javaSqlTypeToString(int type) 44 { 45 switch(type) 46 { 47 case java.sql.Types.BIT: return "BIT"; 48 case java.sql.Types.TINYINT: return "TINYINT"; 49 case java.sql.Types.SMALLINT: return "SMALLINT"; 50 case java.sql.Types.INTEGER: return "INTEGER"; 51 case java.sql.Types.BIGINT: return "BIGINT"; 52 case java.sql.Types.FLOAT: return "FLOAT"; 53 case java.sql.Types.REAL: return "REAL"; 54 case java.sql.Types.DOUBLE: return "DOUBLE"; 55 case java.sql.Types.NUMERIC: return "NUMERIC"; 56 case java.sql.Types.DECIMAL: return "DECIMAL"; 57 case java.sql.Types.CHAR: return "CHAR"; 58 case java.sql.Types.VARCHAR: return "VARCHAR"; 59 case java.sql.Types.LONGVARCHAR: return "LONGVARCHAR"; 60 case java.sql.Types.DATE: return "DATE"; 61 case java.sql.Types.TIME: return "TIME"; 62 case java.sql.Types.TIMESTAMP: return "TIMESTAMP"; 63 case java.sql.Types.BINARY: return "BINARY"; 64 case java.sql.Types.VARBINARY: return "VARBINARY"; 65 case java.sql.Types.LONGVARBINARY: return "LONGVARBINARY"; 66 case java.sql.Types.NULL: return "NULL"; 67 case java.sql.Types.OTHER: return "OTHER"; 68 default: return "UNKNOWN" + type; 69 } 70 } 71 } 72 73 | Popular Tags |