Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public long position(Clob pattern, long start) throws SQLException
        public virtual long position(Clob pattern, long start)
        {
            if (start <= 0)
            {
                throw new SQLException("Bad start: " + start);
            }
            string patternString = pattern.getSubString(0, (int)(pattern.length() & 0x7FFFFFFF));

            return(position(patternString, start));
        }
 private string castToString(object paramObject)
 {
     if (paramObject is Clob)
     {
         Clob clob = (Clob)paramObject;
         try
         {
             return(clob.getSubString(1L, (int)clob.length()));
         }
         catch (SQLException sQLException)
         {
             Console.WriteLine(sQLException.ToString());
             Console.Write(sQLException.StackTrace);
         }
     }
     return((paramObject == null) ? "" : paramObject.ToString());
 }