1 33 34 35 package com.internetcds.jdbc.tds; 36 37 38 import java.sql.*; 39 40 41 42 45 46 class SqlMessage 47 { 48 public static final String cvsVersion = "$Id: SqlMessage.java,v 1.1 2006/06/23 10:39:30 sinisa Exp $"; 49 50 51 int number; 52 int state; 53 int level; 54 String message; 55 String server; 56 String procName; 57 int line; 58 59 64 public String toString() 65 { 66 return 67 "Msg " + number + ", " + 68 "Lvl " + level + ", " + 69 "State " + state + ", " + 70 "" + message + ", " + 71 "Server " + server + ", " + 72 "Procedure " + procName + ", " + 73 "Line " + line; 74 } 75 76 public java.sql.SQLWarning toSQLWarning() 77 { 78 return new java.sql.SQLWarning (message, "S1000", number); 81 } 82 83 public java.sql.SQLException toSQLException() 84 { 85 return new java.sql.SQLException (message, "S1000", number); 86 } 87 } 88 | Popular Tags |