KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sqlmagic > tinysql > tinySQLResultSet


1 /*
2  * The tinySQLResultSet class for the tinySQL JDBC Driver
3  *
4  * A lot of this code is based on or directly taken from
5  * George Reese's (borg@imaginary.com) mSQL driver.
6  *
7  * So, it's probably safe to say:
8  *
9  * Portions of this code Copyright (c) 1996 George Reese
10  *
11  * The rest of it:
12  *
13  * Copyright 1996, Brian C. Jepson
14  * (bjepson@ids.net)
15  *
16  * $Author: davis $
17  * $Date: 2004/12/18 21:30:40 $
18  * $Revision: 1.1 $
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This library is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33  */

34
35 package com.sqlmagic.tinysql;
36
37
38 import java.sql.Date JavaDoc;
39 import java.math.BigDecimal JavaDoc;
40 import java.math.BigInteger JavaDoc;
41 import java.sql.ResultSet JavaDoc;
42 import java.sql.ResultSetMetaData JavaDoc;
43 import java.sql.SQLException JavaDoc;
44 import java.sql.SQLWarning JavaDoc;
45 import java.sql.Statement JavaDoc;
46 import java.sql.Blob JavaDoc;
47 import java.sql.Clob JavaDoc;
48 import java.sql.Ref JavaDoc;
49 import java.sql.Array JavaDoc;
50 import java.sql.Time JavaDoc;
51 import java.sql.Timestamp JavaDoc;
52 import java.sql.Types JavaDoc;
53 import java.text.SimpleDateFormat JavaDoc;
54 import java.util.Calendar JavaDoc;
55 import java.util.Hashtable JavaDoc;
56 import java.text.ParsePosition JavaDoc;
57
58 /**
59  * @author Thomas Morgner <mgs@sherito.org>
60  * <ul>
61  * <li>tinySQLResultSet now holds a reference
62  * to statement which created it. If the resultset was not created by an statement,
63  * <code>null</code> is returned (f.i. used in DatabaseMetaData-Queries).
64  * <li>Changed the code to support setting a fetchsize for queries.
65  * <li>Parsing of dates corrected to format yyyyMMdd
66  * <li>Now supporting the FetchDirection methods, getType().
67  * <li>Concurrency is not returned as CONCUR_READ_ONLY as lowest common standard.
68  * <li>getColumnTypes returns now values given in tsResultSet and does not try to
69  * guess from strings.
70  * </ul>
71  */

72 public class tinySQLResultSet implements java.sql.ResultSet JavaDoc {
73
74   // The Statement that created this resultset
75
private tinySQLStatement statement=(tinySQLStatement)null;
76   private tinySQLPreparedStatement preparedStatement=(tinySQLPreparedStatement)null;
77
78   /**
79    *
80    * The tsResultSet
81    *
82    */

83   private tsResultSet result;
84
85   /**
86    *
87    * A tsRow object to hold the current row
88    *
89    */

90   private tsRow current_row;
91
92   /**
93    *
94    * The index of the current row
95    *
96    */

97   private int current_row_index = 0;
98
99   /**
100    *
101    * The meta data for this result set.
102    *
103    */

104   private tinySQLResultSetMetaData meta;
105
106   /**
107    *
108    * A Hashtable that maps column names to columns
109    *
110    */

111   private Hashtable JavaDoc column_map = null;
112
113   /**
114    *
115    * Given a tsResultSet, this will construct a new tinySQLResultSet
116    * @param res the tsResultSet from a query
117    *
118    */

119    public tinySQLResultSet(tsResultSet res, tinySQLStatement inputStatement) {
120     result = res;
121      this.statement = inputStatement;
122   }
123    public tinySQLResultSet(tsResultSet res, tinySQLPreparedStatement inputStatement) {
124     result = res;
125      this.preparedStatement = inputStatement;
126   }
127
128   /**
129    *
130    * Advance to the next row in the result set.
131    * @see java.sql.ResultSet#next
132    * @exception SQLException thrown in case of error
133    * @return true if there are any more rows to process, otherwise false.
134    *
135    */

136   public synchronized boolean next() throws SQLException JavaDoc {
137
138     try {
139
140       // automatically return false if the
141
// result set is empty
142
//
143
if( result.size() < 1 ) {
144         return false;
145       }
146
147       // increment the current row index
148
//
149
current_row_index++;
150       // retrieve the row at the current_row_index and store
151
// it in the current_row field.
152
//
153
current_row = result.rowAt(current_row_index - 1);
154
155       // If no rows was retrieved, return false to indicate
156
// that there are no more results.
157
if (current_row == null)
158       {
159         return false;
160       }
161       return true;
162
163     } catch( Exception JavaDoc e ) {
164       throw new SQLException JavaDoc(e.getMessage());
165     }
166
167   }
168
169   /**
170    *
171    * Provides a method to close a ResultSet
172    *
173    * @see java.sql.ResultSet#close
174    *
175    */

176   public void close() throws SQLException JavaDoc {
177   }
178
179   /**
180    *
181    * Returns whether or not the last column read was null.
182    * tinySQL doesn't have nulls, so this is inconsequential...
183    * @see java.sql.ResultSet#wasNull
184    * @return true if the column was null, false otherwise
185    *
186    */

187   public boolean wasNull() throws SQLException JavaDoc {
188     return false;
189   }
190
191   /**
192    *
193    * Gets the value of a column (by index) as a String.
194    * @see java.sql.ResultSet#getString
195    * @exception SQLException thrown for bogus column index
196    * @param column the column index
197    * @return the column's String value
198    *
199    */

200   public String JavaDoc getString(int column) throws SQLException JavaDoc {
201
202     // retrieve the column at the specified index. tinySQL
203
// has a column offset of zero, while JDBC uses one.
204
// Because of this, I need to subtract one from the
205
// index to get the tinySQL index.
206
//
207
if ( current_row == (tsRow)null ) return (String JavaDoc)null;
208     tsColumn col = result.columnAtIndex(column-1);
209
210     // return the column's value
211
//
212
return current_row.columnAsString(col);
213   }
214
215   /**
216    *
217    * Get the value of a column in the current row as a Java byte.
218    *
219    * @param columnIndex the first column is 1, the second is 2, ...
220    * @return the column value
221    *
222    */

223   public byte getByte(int column) throws SQLException JavaDoc {
224
225     // get the column as a string
226
//
227
String JavaDoc str = getString(column);
228
229     // if it's a blank string, return 0,
230
// otherwise, cast the first character
231
// in the string to byte and return it.
232
//
233
if( str.equals("") ) {
234       return 0;
235     } else {
236       return (byte)str.charAt(0);
237     }
238
239   }
240
241   /**
242    *
243    * Get the value of a column in the current row as boolean
244    * @see java.sql.ResultSet#getBoolean
245    * @exception SQLException Harum Scarum's coming down fast, Clay...
246    * @param column the column index
247    * @return false for "", null, or "0"; true otherwise
248    */

249   public boolean getBoolean(int column) throws SQLException JavaDoc {
250
251     try {
252
253       // get the column as a string
254
//
255
String JavaDoc str = getString(column);
256
257       // a blank string is false
258
//
259
if( str.equals("") ) return false;
260
261       // a zero is false
262
//
263
if( str.equals("0") ) return false;
264
265       // nothing is true... everything is permitted
266
//
267
return true;
268
269     } catch( Exception JavaDoc e ) {
270       throw new SQLException JavaDoc(e.getMessage());
271     }
272   }
273
274   /**
275    *
276    * Get the value of a column in the current row as a short.
277    * @see java.sql.ResultSet#getShort
278    * @exception SQLException D'ohh!
279    * @param column the column being retrieved
280    * @return the column as a short
281    *
282    */

283   public short getShort(int column)
284      throws SQLException JavaDoc
285   {
286
287     // get the column as a string
288
//
289
String JavaDoc str = getString(column);
290
291     // if it's null, return 0
292
//
293
if( str == null ) return 0;
294
295     // try to convert it to an integer, and cast it to short
296
//
297
try
298     {
299       return ( short )( Integer.valueOf( str.trim( )).intValue( ));
300     }
301     catch( NumberFormatException JavaDoc e )
302     {
303       throw new SQLException JavaDoc( "tinySQL invalid short Number: " + e.getMessage( ));
304     }
305   }
306
307   /**
308    *
309    * Retrieve a column from the current row as an int
310    * @see java.sql.ResultSet#getInt
311    * @exception SQLException bad things... the wind began to howl...
312    * @param column the column being retrieved
313    * @return the column as an integer
314    *
315    */

316   public int getInt(int column)
317      throws SQLException JavaDoc
318   {
319     int dotAt;
320
321     // get the column as a string
322
//
323
String JavaDoc str = getString(column);
324
325     // if it's null, return Integer.MIN_VALUE
326
//
327
if( str == null ) return Integer.MIN_VALUE;
328
329     // try to convert this string to integer
330
//
331
dotAt = str.indexOf(".");
332     if ( dotAt > -1 ) str = str.substring(0,dotAt);
333     try
334     {
335       return Integer.valueOf( str.trim( )).intValue( );
336     }
337     catch( NumberFormatException JavaDoc e )
338     {
339       return Integer.MIN_VALUE;
340     }
341   }
342
343   /**
344    *
345    * Get the value of a column in the current row as a long
346    * @see java.sql.ResultSet#getLong
347    * @exception SQLException in case of an error
348    * @param column the column being retrieved
349    * @return the column as a long
350    *
351    */

352   public long getLong(int column)
353     throws SQLException JavaDoc
354   {
355
356     // get the column as a string
357
//
358
String JavaDoc str = getString(column);
359
360     // it it's null, return 0
361
if( str == null ) return 0;
362
363     // try to convert the String to a long
364
//
365
try
366     {
367       return Long.valueOf( str.trim( )).longValue( );
368     }
369     catch( NumberFormatException JavaDoc e )
370     {
371       throw new SQLException JavaDoc( "tinySQL invalid Long Number: " + e.getMessage( ));
372     }
373   }
374
375   /**
376    *
377    * Return a column as a float.
378    * @see java.sql.ResultSet#getFloat
379    * @exception SQLException in case of error
380    * @param column the column being retrieved
381    * @return the column as a float
382    *
383    */

384   public float getFloat(int column)
385      throws SQLException JavaDoc
386   {
387
388     // get the column as a string
389
//
390
String JavaDoc str = getString(column);
391
392     // if it's null, assume zero
393
//
394
if( str == null ) return 0;
395
396     // try to perform the conversion
397
//
398
try
399     {
400       return Float.valueOf( str.trim( )).floatValue( );
401     }
402     catch( NumberFormatException JavaDoc e )
403     {
404       throw new SQLException JavaDoc( "Invalid Number: " + e.getMessage( ));
405     }
406   }
407
408   /**
409    *
410    * Return a column as a double
411    * @see java.sql.ResultSet#getDouble
412    * @exception SQLException in case of error
413    * @param column the column being retrieved
414    * @return the column as a double
415    *
416    */

417   public double getDouble(int column)
418     throws SQLException JavaDoc
419   {
420
421     // get the column as a string
422
//
423
String JavaDoc str = getString(column);
424
425     // it it's null, return zero
426
//
427
if( str == null ) return 0;
428
429     // attempt the conversion
430
//
431
try
432     {
433       return Double.valueOf( str.trim( )).doubleValue( );
434     }
435     catch( NumberFormatException JavaDoc e )
436     {
437       throw new SQLException JavaDoc( "tinySQL invalid double Number: " + e.getMessage( ));
438     }
439   }
440
441   /**
442    *
443    * Return a column as a BigDecimal object
444    * @see java.sql.ResultSet#getBigDecimal
445    * @exception SQLException in case of a problem
446    * @param column the column being retrieved
447    * @param scale the number of digits to the right of the decimal
448    * @return the column as a BigDecimal
449    * @deprecated
450    */

451   public BigDecimal JavaDoc getBigDecimal(int column, int scale)
452        throws SQLException JavaDoc
453   {
454
455     // get the column as a string
456
//
457
String JavaDoc str = getString(column);
458
459     // return null as zero, otherwise use the string
460
//
461
if( str == null )
462       return new BigDecimal JavaDoc(new BigInteger JavaDoc("0"), scale);
463     else
464       return new BigDecimal JavaDoc( new BigInteger JavaDoc( str.trim( )), scale );
465   }
466
467   /**
468    *
469    * Get the value of a column in the current row as a Java byte array.
470    * @see java.sql.ResultSet#getBytes
471    * @exception SQLException thrown in case of trouble
472    * @param column the column being retrieved
473    * @return a byte array that is the value of the column
474    *
475    */

476   public byte[] getBytes(int column) throws SQLException JavaDoc {
477
478     // get the column as a string
479
//
480
String JavaDoc str = getString(column);
481
482     if( str == null ) return null;
483     try {
484       return str.getBytes(str);
485     }
486     catch( java.io.UnsupportedEncodingException JavaDoc e ) {
487       throw new java.sql.SQLException JavaDoc("Bad bytes!: " + e.getMessage());
488     }
489
490   }
491
492   /**
493    *
494    * Get the value of a column in the current row as a java.sql.Date object.
495    * @see java.sqlResultSet#getDate
496    * @exception SQLException thrown in case of error
497    * @param column the column being retrieved
498    * @return the java.sql.Date object for the column
499    *
500    */

501   public java.sql.Date JavaDoc getDate(int column)
502        throws SQLException JavaDoc {
503
504     // get the column as a string
505
//
506
String JavaDoc str = getString(column);
507
508     // return null if the string is null
509
//
510
if( str == null ) return null;
511
512     // try to use the string to instantiate a java.util.Date object,
513
// then use that object to instantiate a java.sql.Date object.
514
//
515
/**
516      * Dbase uses YYYYMMDD format for dates.
517      */

518     try {
519       SimpleDateFormat JavaDoc fmt = new SimpleDateFormat JavaDoc("yyyyMMdd");
520       java.util.Date JavaDoc d = fmt.parse(str, new ParsePosition JavaDoc(0));
521
522       return new java.sql.Date JavaDoc(d.getTime());
523
524     } catch( Exception JavaDoc e ) {
525       throw new SQLException JavaDoc("Date format error: " + e.getMessage());
526     }
527
528   }
529
530   /**
531    *
532    * Get the value of a column in the current row as a java.sql.Time object.
533    *
534    * @see java.sql.ResultSet#getTime
535    * @exception SQLException thrown in the event of troubles
536    * @param column the column being retrieved
537    * @return the column as a java.sql.Time object
538    *
539    */

540   public java.sql.Time JavaDoc getTime(int column)
541        throws SQLException JavaDoc {
542
543     // get the column as a string
544
//
545
String JavaDoc str = getString(column);
546
547     // if the string is null, return null
548
//
549
if( str == null ) return null;
550
551     // try to use the string to instantiate a java.util.Date object,
552
// then use that object to instantiate a java.sql.Time object.
553
//
554
try {
555
556       SimpleDateFormat JavaDoc fmt = new SimpleDateFormat JavaDoc("EEE MMM dd hh:mm:ss z yyyy");
557       java.util.Date JavaDoc d = fmt.parse(str, new ParsePosition JavaDoc(0));
558
559       return new java.sql.Time JavaDoc(d.getTime());
560
561     } catch( Exception JavaDoc e ) {
562       throw new SQLException JavaDoc("Data format error: " + e.getMessage());
563     }
564   }
565
566   /**
567    * Get the value of a column in the current row as a java.sql.Timestamp
568    * @see java.sql.ResultSet#getTimestamp
569    * @exception SQLException thrown in the event of troubles
570    * @param column the column being retrieved
571    * @return the column as a java.sql.Timestamp object
572    */

573   public java.sql.Timestamp JavaDoc getTimestamp(int column)
574        throws SQLException JavaDoc {
575
576     // get the column as a string
577
//
578
String JavaDoc str = getString(column);
579
580     // if the string is null, return null
581
//
582
if( str == null ) return null;
583
584     // try to use the string to instantiate a java.util.Date object,
585
// then use that object to instantiate a java.sql.Timestamp object.
586
//
587
try {
588
589       SimpleDateFormat JavaDoc fmt = new SimpleDateFormat JavaDoc("EEE MMM dd hh:mm:ss z yyyy");
590       java.util.Date JavaDoc d = fmt.parse(str, new ParsePosition JavaDoc(0));
591
592       return new java.sql.Timestamp JavaDoc(d.getTime());
593
594     } catch( Exception JavaDoc e ) {
595       throw new SQLException JavaDoc("Data format error: " + e.getMessage());
596     }
597
598   }
599
600   /**
601    *
602    * This is not currently supported.
603    *
604    */

605   public java.io.InputStream JavaDoc getAsciiStream(int column)
606        throws SQLException JavaDoc {
607     return null;
608   }
609
610   /**
611    *
612    * This is not currently supported.
613    * @deprecated
614    *
615    */

616   public java.io.InputStream JavaDoc getUnicodeStream(int column)
617        throws SQLException JavaDoc {
618     return null;
619   }
620
621   /**
622    *
623    * This is not currently supported.
624    *
625    */

626   public java.io.InputStream JavaDoc getBinaryStream(int column)
627        throws SQLException JavaDoc {
628     return null;
629   }
630
631
632   /**
633    *
634    * Get the name of the cursor corresponding to this result set.
635    * This has to meaning to tinySQL
636    * @see java.sql.ResultSet#getCursorName
637    * @return ""
638    *
639    */

640   public String JavaDoc getCursorName() throws SQLException JavaDoc {
641     return "";
642   }
643
644   /**
645    *
646    * Returns a ResultSetMetaData object for this result set
647    * @see java.sql.ResultSet#getMetaData
648    * @exception SQLException thrown on error getting meta-data
649    * @return ResultSetMetaData object containing result set info
650    *
651    */

652   public ResultSetMetaData JavaDoc getMetaData()
653        throws SQLException JavaDoc {
654
655     // if we didn't instantiate a meta data object, then
656
// do so. Since it's a field of this object, and
657
// not private to this method, it will stay around
658
// between calls to this method.
659
//
660
if( meta == null ) {
661       meta = new tinySQLResultSetMetaData(result);
662     }
663
664     // return the ResultSetMetaData object
665
//
666
return meta;
667   }
668
669   /**
670    *
671    * Retrieves data as objects
672    * @see java.sql.ResultSet#getObject
673    * @exception SQLException in the event of an error
674    * @param column the column desired
675    * @param type the SQL data type of the field
676    * @scale precision for BigDecimals
677    * @return the column specified as an Object
678    *
679    */

680   public Object JavaDoc getObject(int column, int type, int scale)
681        throws SQLException JavaDoc {
682
683     switch(type) {
684     case Types.BIT:
685       return new Boolean JavaDoc(getBoolean(column));
686
687     case Types.TINYINT:
688       return new Character JavaDoc((char)getInt(column));
689
690     case Types.SMALLINT:
691       return new Integer JavaDoc(getShort(column));
692
693     case Types.INTEGER:
694       return new Integer JavaDoc(getInt(column));
695
696     case Types.BIGINT:
697       return new Long JavaDoc(getLong(column));
698
699     case Types.FLOAT:
700       return new Float JavaDoc(getFloat(column));
701
702     case Types.REAL:
703       return new Float JavaDoc(getFloat(column));
704
705     case Types.DOUBLE:
706       return new Double JavaDoc(getDouble(column));
707
708     case Types.NUMERIC:
709       return getBigDecimal(column, scale);
710
711     case Types.DECIMAL:
712       return getBigDecimal(column, scale);
713
714     case Types.CHAR:
715       return getString(column);
716
717     case Types.VARCHAR:
718       return getString(column);
719
720     case Types.LONGVARCHAR:
721       return getString(column);
722
723     case Types.DATE:
724       return getDate(column);
725
726     case Types.TIME:
727       return getTime(column);
728
729     case Types.TIMESTAMP:
730       return getTimestamp(column);
731
732     case Types.BINARY:
733       return getBytes(column);
734
735     case Types.VARBINARY:
736       return getBytes(column);
737
738     case Types.LONGVARBINARY:
739       return getBytes(column);
740
741     default:
742       return null;
743     }
744   }
745
746   /**
747    *
748    * Same as above, except with a default scale to 0.
749    *
750    */

751   public Object JavaDoc getObject(int column, int type)
752        throws SQLException JavaDoc {
753     return getObject(column, type, 0);
754   }
755
756   /**
757    *
758    * Same as above, except using the column's default SQL type.
759    *
760    */

761   public Object JavaDoc getObject(int column) throws SQLException JavaDoc {
762     ResultSetMetaData JavaDoc meta = getMetaData();
763     int type = meta.getColumnType(column);
764
765     return getObject(column, type);
766   }
767
768   /**
769    *
770    * Return the String value of a column given its name, rather than
771    * its index.
772    * @see java.sql.ResultSet#getString
773    * @param name the name of the column desired
774    * @return the value of the column as a String
775    *
776    */

777   public String JavaDoc getString(String JavaDoc name) throws SQLException JavaDoc {
778
779     return getString(findColumn(name));
780
781   }
782
783   /**
784    *
785    * Returns the column as a byte based on column name
786    *
787    */

788   public byte getByte(String JavaDoc columnName) throws SQLException JavaDoc {
789
790     return getByte(findColumn(columnName));
791
792   }
793
794   /**
795    *
796    * Get the value of a boolean column in the current row
797    * @param columnName is the SQL name of the column
798    * @return the column value; if isNull the value is false
799    *
800    */

801   public boolean getBoolean(String JavaDoc columnName) throws SQLException JavaDoc {
802
803     return getBoolean(findColumn(columnName));
804
805   }
806
807   /**
808    *
809    * Get the value of a short by column name
810    * @param columnName is the SQL name of the column
811    * @return the column value; if isNull the value is 0
812    *
813    */

814   public short getShort(String JavaDoc columnName) throws SQLException JavaDoc {
815
816     return getShort(findColumn(columnName));
817
818   }
819
820   /**
821    *
822    * Get the integer value of a column by name
823    * @param columnName is the SQL name of the column
824    * @return the column value; if isNull the value is 0
825    *
826    */

827   public int getInt(String JavaDoc columnName) throws SQLException JavaDoc {
828
829     return getInt(findColumn(columnName));
830
831   }
832
833   /**
834    *
835    * Get the long value of a column by name
836    * @param columnName is the SQL name of the column
837    * @return the column value; if isNull the value is 0
838    *
839    */

840   public long getLong(String JavaDoc columnName) throws SQLException JavaDoc {
841
842     return getLong(findColumn(columnName));
843
844   }
845
846   /**
847    *
848    * Get the float value of a column by name
849    * @param columnName is the SQL name of the column
850    * @return the column value; if isNull the value is 0
851    *
852    */

853   public float getFloat(String JavaDoc columnName) throws SQLException JavaDoc {
854
855     return getFloat(findColumn(columnName));
856
857   }
858
859   /**
860    *
861    * Get the double value of a named column
862    * @param columnName is the SQL name of the column
863    * @return the column value; if isNull the value is 0
864    *
865    */

866   public double getDouble(String JavaDoc columnName) throws SQLException JavaDoc {
867
868     return getDouble(findColumn(columnName));
869
870   }
871
872   /**
873    *
874    * Get the value of a named column as a BigDecimal object
875    * @param columnName is the SQL name of the column
876    * @return the column value; if isNull the value is null
877    * @deprecated
878    */

879   public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName, int scale) throws SQLException JavaDoc {
880
881     return getBigDecimal(findColumn(columnName), scale);
882
883   }
884
885   /**
886    *
887    * Get the value of a named column as a byte array
888    * @param columnName is the SQL name of the column
889    * @return the column value; if isNull the value is null
890    *
891    */

892   public byte[] getBytes(String JavaDoc columnName) throws SQLException JavaDoc {
893
894     return getBytes(findColumn(columnName));
895
896   }
897
898   /**
899    *
900    * Get a named column as a java.sql.Date
901    * @param columnName is the SQL name of the column
902    * @return the column value; if isNull the value is null
903    *
904    */

905   public java.sql.Date JavaDoc getDate(String JavaDoc columnName) throws SQLException JavaDoc {
906
907     return getDate(findColumn(columnName));
908
909   }
910
911   /**
912    *
913    * Get a named column as a java.sql.Time
914    * @param columnName is the SQL name of the column
915    * @return the column value; if isNull the value is null
916    *
917    */

918   public java.sql.Time JavaDoc getTime(String JavaDoc columnName) throws SQLException JavaDoc {
919
920     return getTime(findColumn(columnName));
921
922   }
923
924   /**
925    *
926    * Get a named column as a java.sql.Time
927    * @param columnName is the SQL name of the column
928    * @return the column value; if isNull the value is null
929    *
930    */

931   public java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc columnName)
932        throws SQLException JavaDoc {
933
934     return getTimestamp(findColumn(columnName));
935
936   }
937
938   /**
939    *
940    * This is unsupported, but we'll try to call the corresponding
941    * call by column index.
942    *
943    */

944   public java.io.InputStream JavaDoc getAsciiStream(String JavaDoc columnName)
945        throws SQLException JavaDoc {
946
947     return getAsciiStream(findColumn(columnName));
948
949   }
950
951   /**
952    *
953    * This is unsupported, but we'll try to call the corresponding
954    * call by column index.
955    * @deprecated
956    *
957    */

958   public java.io.InputStream JavaDoc getUnicodeStream(String JavaDoc columnName)
959        throws SQLException JavaDoc {
960
961     return getUnicodeStream(findColumn(columnName));
962
963   }
964
965   /**
966    *
967    * This is unsupported, but we'll try to call the corresponding
968    * call by column index.
969    *
970    */

971   public java.io.InputStream JavaDoc getBinaryStream(String JavaDoc columnName)
972        throws SQLException JavaDoc {
973
974     return getBinaryStream(findColumn(columnName));
975
976   }
977
978   /**
979    *
980    * Get the value of a named column as an object
981    * @param columnName the SQL column name
982    * @param sqlType SQL type code defined by java.sql.Types
983    * @return the parameter as an Object
984    *
985    */

986   public Object JavaDoc getObject(String JavaDoc columnName, int sqlType, int scale)
987        throws SQLException JavaDoc {
988
989     return getObject(findColumn(columnName), sqlType, scale);
990
991   }
992
993   /**
994    *
995    * Same as above, except defaulting scale to 0.
996    *
997    */

998   public Object JavaDoc getObject(String JavaDoc columnName, int type)
999        throws SQLException JavaDoc {
1000
1001    return getObject(findColumn(columnName), type, 0);
1002
1003  }
1004
1005  /**
1006   *
1007   * Same as above, except returning the default SQL type
1008   *
1009   */

1010  public Object JavaDoc getObject(String JavaDoc columnName) throws SQLException JavaDoc {
1011    return getObject(findColumn(columnName));
1012  }
1013
1014  /**
1015   *
1016   * Given a column name, this method returns the column number for that
1017   * name. Column name to number mappings are kept inside a Hashtable.
1018   * Applications that do not need the overhead of this calculation are
1019   * not penalized since the mapping only occurs on the first attempt to
1020   * access a column number by name.
1021   * @exception java.sql.SQLException thrown if a bad name is passed
1022   * @param name the name of the column desired
1023   * @return the column number, 1 being the first column
1024   *
1025   */

1026  public int findColumn(String JavaDoc name) throws SQLException JavaDoc {
1027
1028    Integer JavaDoc num;
1029
1030    // does the column map exist?
1031
//
1032
if( column_map == null ) {
1033
1034      int i, maxi;
1035      String JavaDoc columnIndexName;
1036
1037      // create a Hashtable which expects to hold
1038
// enough objects for all the columns in the
1039
// result set.
1040
//
1041
column_map = new Hashtable JavaDoc(maxi = result.numcols());
1042
1043      // add each column by name, with an Integer index
1044
//
1045
for(i=0; i<maxi; i++) {
1046        tsColumn tsc = result.columnAtIndex(i);
1047        columnIndexName = tsc.name;
1048        if ( tsc.alias != (String JavaDoc)null ) columnIndexName = tsc.alias;
1049        column_map.put(columnIndexName, new Integer JavaDoc(i));
1050      }
1051    }
1052
1053    // one way or another, we've got a column_map; either it
1054
// already existed, or the above code created it.
1055
//
1056

1057    // look up the column name in the map, and find it's
1058
// index (the Integer object)
1059
//
1060
num = (Integer JavaDoc)column_map.get(name);
1061    if( num == null ) {
1062      throw new SQLException JavaDoc("Invalid column name: " + name);
1063    }
1064
1065    // return the column index as an int
1066
//
1067
return num.intValue() + 1;
1068
1069  }
1070
1071  /**
1072   *
1073   * Return the warning chain. This is presently unsupported.
1074   * @see java.sql.Statement#getWarnings
1075   * @return the chain of warnings
1076   *
1077   */

1078  public SQLWarning JavaDoc getWarnings() throws SQLException JavaDoc {
1079    return null;
1080  }
1081
1082  /**
1083   *
1084   * Clear the chain of warnings. This does nothing, since the
1085   * warning chain is not used by tinySQL
1086   * @see java.sql.Statement#clearWarnings
1087   *
1088   */

1089  public void clearWarnings() throws SQLException JavaDoc {
1090  }
1091 
1092 
1093    //--------------------------JDBC 2.0-----------------------------------
1094

1095    //---------------------------------------------------------------------
1096
// Getter's and Setter's
1097
//---------------------------------------------------------------------
1098

1099    /**
1100     * JDBC 2.0
1101     *
1102     * <p>Gets the value of a column in the current row as a java.io.Reader.
1103     * @param columnIndex the first column is 1, the second is 2, ...
1104     */

1105    public java.io.Reader JavaDoc getCharacterStream(int columnIndex) throws SQLException JavaDoc {
1106      return null;
1107    }
1108
1109    /**
1110     * JDBC 2.0
1111     *
1112     * <p>Gets the value of a column in the current row as a java.io.Reader.
1113     * @param columnName the name of the column
1114         * @return the value in the specified column as a <code>java.io.Reader</code>
1115     */

1116    public java.io.Reader JavaDoc getCharacterStream(String JavaDoc columnName) throws SQLException JavaDoc {
1117      return null;
1118    }
1119
1120    /**
1121     * JDBC 2.0
1122     *
1123     * Gets the value of a column in the current row as a java.math.BigDecimal
1124     * object with full precision.
1125     *
1126     * @param columnIndex the first column is 1, the second is 2, ...
1127     * @return the column value (full precision); if the value is SQL NULL,
1128     * the result is null
1129     * @exception SQLException if a database access error occurs
1130     */

1131    public BigDecimal JavaDoc getBigDecimal(int columnIndex) throws SQLException JavaDoc {
1132      return null;
1133    }
1134
1135    /**
1136     * JDBC 2.0
1137     *
1138     * Gets the value of a column in the current row as a java.math.BigDecimal
1139     * object with full precision.
1140     * @param columnName the column name
1141     * @return the column value (full precision); if the value is SQL NULL,
1142     * the result is null
1143     * @exception SQLException if a database access error occurs
1144     *
1145     */

1146    public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName) throws SQLException JavaDoc {
1147      return null;
1148    }
1149
1150    //---------------------------------------------------------------------
1151
// Traversal/Positioning
1152
//---------------------------------------------------------------------
1153

1154    /**
1155     * JDBC 2.0
1156     *
1157     * <p>Indicates whether the cursor is before the first row in the result
1158     * set.
1159     *
1160     * @return true if the cursor is before the first row, false otherwise. Returns
1161     * false when the result set contains no rows.
1162     * @exception SQLException if a database access error occurs
1163     */

1164    public boolean isBeforeFirst() throws SQLException JavaDoc {
1165      return false;
1166    }
1167
1168    /**
1169     * JDBC 2.0
1170     *
1171     * <p>Indicates whether the cursor is after the last row in the result
1172     * set.
1173     *
1174     * @return true if the cursor is after the last row, false otherwise. Returns
1175     * false when the result set contains no rows.
1176     * @exception SQLException if a database access error occurs
1177     */

1178    public boolean isAfterLast() throws SQLException JavaDoc {
1179      return false;
1180    }
1181
1182    /**
1183     * JDBC 2.0
1184     *
1185     * <p>Indicates whether the cursor is on the first row of the result set.
1186     *
1187     * @return true if the cursor is on the first row, false otherwise.
1188     * @exception SQLException if a database access error occurs
1189     */

1190    public boolean isFirst() throws SQLException JavaDoc {
1191      return false;
1192    }
1193
1194    /**
1195     * JDBC 2.0
1196     *
1197     * <p>Indicates whether the cursor is on the last row of the result set.
1198     * Note: Calling the method <code>isLast</code> may be expensive
1199         * because the JDBC driver
1200     * might need to fetch ahead one row in order to determine
1201     * whether the current row is the last row in the result set.
1202     *
1203     * @return true if the cursor is on the last row, false otherwise.
1204     * @exception SQLException if a database access error occurs
1205     */

1206    public boolean isLast() throws SQLException JavaDoc {
1207      return false;
1208    }
1209
1210    /**
1211     * JDBC 2.0
1212     *
1213     * <p>Moves the cursor to the front of the result set, just before the
1214     * first row. Has no effect if the result set contains no rows.
1215     *
1216     * @exception SQLException if a database access error occurs or the
1217     * result set type is TYPE_FORWARD_ONLY
1218     */

1219    public void beforeFirst() throws SQLException JavaDoc {
1220      return ;
1221    }
1222
1223    /**
1224     * JDBC 2.0
1225     *
1226     * <p>Moves the cursor to the end of the result set, just after the last
1227     * row. Has no effect if the result set contains no rows.
1228     *
1229     * @exception SQLException if a database access error occurs or the
1230     * result set type is TYPE_FORWARD_ONLY
1231         */

1232    public void afterLast() throws SQLException JavaDoc {
1233      return ;
1234    }
1235
1236    /**
1237     * JDBC 2.0
1238     *
1239     * <p>Moves the cursor to the first row in the result set.
1240     *
1241     * @return true if the cursor is on a valid row; false if
1242         * there are no rows in the result set
1243     * @exception SQLException if a database access error occurs or the
1244     * result set type is TYPE_FORWARD_ONLY
1245     */

1246    public boolean first() throws SQLException JavaDoc {
1247      return false;
1248    }
1249
1250    /**
1251     * JDBC 2.0
1252     *
1253     * <p>Moves the cursor to the last row in the result set.
1254     *
1255     * @return true if the cursor is on a valid row;
1256         * false if there are no rows in the result set
1257     * @exception SQLException if a database access error occurs or the
1258     * result set type is TYPE_FORWARD_ONLY.
1259     */

1260    public boolean last() throws SQLException JavaDoc {
1261      return false;
1262    }
1263
1264    /**
1265     * JDBC 2.0
1266     *
1267     * <p>Retrieves the current row number. The first row is number 1, the
1268     * second number 2, and so on.
1269     *
1270     * @return the current row number; 0 if there is no current row
1271     * @exception SQLException if a database access error occurs
1272     */

1273    public int getRow() throws SQLException JavaDoc {
1274      return 0;
1275    }
1276
1277    /**
1278     * JDBC 2.0
1279     *
1280     * <p>Moves the cursor to the given row number in the result set.
1281     *
1282     * <p>If the row number is positive, the cursor moves to
1283         * the given row number with respect to the
1284     * beginning of the result set. The first row is row 1, the second
1285     * is row 2, and so on.
1286     *
1287     * <p>If the given row number is negative, the cursor moves to
1288         * an absolute row position with respect to
1289     * the end of the result set. For example, calling
1290         * <code>absolute(-1)</code> positions the
1291     * cursor on the last row, <code>absolute(-2)</code> indicates the next-to-last
1292     * row, and so on.
1293     *
1294     * <p>An attempt to position the cursor beyond the first/last row in
1295     * the result set leaves the cursor before/after the first/last
1296     * row, respectively.
1297     *
1298     * <p>Note: Calling <code>absolute(1)</code> is the same
1299         * as calling <code>first()</code>.
1300     * Calling <code>absolute(-1)</code> is the same as calling <code>last()</code>.
1301     *
1302     * @return true if the cursor is on the result set; false otherwise
1303     * @exception SQLException if a database access error occurs or
1304     * row is 0, or result set type is TYPE_FORWARD_ONLY.
1305     */

1306    public boolean absolute( int row ) throws SQLException JavaDoc {
1307      return false;
1308    }
1309
1310    /**
1311     * JDBC 2.0
1312     *
1313     * <p>Moves the cursor a relative number of rows, either positive or negative.
1314     * Attempting to move beyond the first/last row in the
1315     * result set positions the cursor before/after the
1316     * the first/last row. Calling <code>relative(0)</code> is valid, but does
1317     * not change the cursor position.
1318     *
1319     * <p>Note: Calling <code>relative(1)</code>
1320         * is different from calling <code>next()</code>
1321     * because is makes sense to call <code>next()</code> when there is no current row,
1322     * for example, when the cursor is positioned before the first row
1323     * or after the last row of the result set.
1324     *
1325     * @return true if the cursor is on a row; false otherwise
1326     * @exception SQLException if a database access error occurs, there
1327     * is no current row, or the result set type is TYPE_FORWARD_ONLY
1328     */

1329    public boolean relative( int rows ) throws SQLException JavaDoc {
1330      return false;
1331    }
1332
1333    /**
1334     * JDBC 2.0
1335     *
1336     * <p>Moves the cursor to the previous row in the result set.
1337     *
1338     * <p>Note: <code>previous()</code> is not the same as
1339         * <code>relative(-1)</code> because it
1340     * makes sense to call</code>previous()</code> when there is no current row.
1341     *
1342     * @return true if the cursor is on a valid row; false if it is off the result set
1343     * @exception SQLException if a database access error occurs or the
1344     * result set type is TYPE_FORWARD_ONLY
1345     */

1346    public boolean previous() throws SQLException JavaDoc {
1347      return false;
1348    }
1349
1350    //---------------------------------------------------------------------
1351
// Properties
1352
//---------------------------------------------------------------------
1353

1354    /**
1355     * JDBC 2.0
1356     *
1357     * The rows in a result set will be processed in a forward direction;
1358     * first-to-last.
1359     */

1360    int FETCH_FORWARD = 1000;
1361
1362    /**
1363     * JDBC 2.0
1364     *
1365     * The rows in a result set will be processed in a reverse direction;
1366     * last-to-first.
1367     */

1368    int FETCH_REVERSE = 1001;
1369
1370    /**
1371     * JDBC 2.0
1372     *
1373     * The order in which rows in a result set will be processed is unknown.
1374     */

1375    int FETCH_UNKNOWN = 1002;
1376
1377    /**
1378     * JDBC 2.0
1379     *
1380     * Gives a hint as to the direction in which the rows in this result set
1381     * will be processed. The initial value is determined by the statement
1382     * that produced the result set. The fetch direction may be changed
1383     * at any time.
1384     *
1385     * @exception SQLException if a database access error occurs or
1386     * the result set type is TYPE_FORWARD_ONLY and the fetch direction is not
1387     * FETCH_FORWARD.
1388     */

1389    public void setFetchDirection(int direction) throws SQLException JavaDoc {
1390      return ;
1391    }
1392
1393    /**
1394     * JDBC 2.0
1395     *
1396     * Returns the fetch direction for this result set.
1397     *
1398         * @return the current fetch direction for this result set
1399     * @exception SQLException if a database access error occurs
1400     */

1401    public int getFetchDirection() throws SQLException JavaDoc {
1402      return FETCH_FORWARD;
1403    }
1404
1405    /**
1406     * JDBC 2.0
1407     *
1408     * Gives the JDBC driver a hint as to the number of rows that should
1409     * be fetched from the database when more rows are needed for this result
1410     * set. If the fetch size specified is zero, the JDBC driver
1411     * ignores the value and is free to make its own best guess as to what
1412     * the fetch size should be. The default value is set by the statement
1413     * that created the result set. The fetch size may be changed at any
1414     * time.
1415     *
1416     * @param rows the number of rows to fetch
1417     * @exception SQLException if a database access error occurs or the
1418     * condition 0 <= rows <= this.getMaxRows() is not satisfied.
1419     */

1420    public void setFetchSize(int rows) throws SQLException JavaDoc {
1421      if (rows <= 0)
1422            throw new SQLException JavaDoc ("Condition 0 <= rows <= this.getMaxRows() is not satisfied");
1423    
1424      result.setFetchSize (rows);
1425    }
1426
1427    /**
1428     * JDBC 2.0
1429     *
1430     * Returns the fetch size for this result set.
1431     *
1432         * @return the current fetch size for this result set
1433     * @exception SQLException if a database access error occurs
1434     */

1435    public int getFetchSize() throws SQLException JavaDoc {
1436      return result.getFetchSize ();
1437    }
1438
1439    /**
1440     * JDBC 2.0
1441         * The type for a <code>ResultSet</code> object whose cursor may
1442         * move only forward.
1443     */

1444    int TYPE_FORWARD_ONLY = 1003;
1445
1446    /**
1447     * JDBC 2.0
1448         * The type for a <code>ResultSet</code> object that is scrollable
1449         * but generally not sensitive to changes made by others.
1450         *
1451     */

1452    int TYPE_SCROLL_INSENSITIVE = 1004;
1453
1454    /**
1455     * JDBC 2.0
1456         * The type for a <code>ResultSet</code> object that is scrollable
1457         * and generally sensitive to changes made by others.
1458     */

1459    int TYPE_SCROLL_SENSITIVE = 1005;
1460
1461    /**
1462     * JDBC 2.0
1463     *
1464     * Returns the type of this result set. The type is determined by
1465     * the statement that created the result set.
1466     *
1467     * @return TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or
1468         * TYPE_SCROLL_SENSITIVE
1469     * @exception SQLException if a database access error occurs
1470     */

1471    public int getType() throws SQLException JavaDoc {
1472      return result.getType ();
1473    }
1474
1475    /**
1476     * JDBC 2.0
1477         * The concurrency mode for a <code>ResultSet</code> object
1478         * that may NOT be updated.
1479     *
1480     */

1481    int CONCUR_READ_ONLY = 1007;
1482
1483    /**
1484     * JDBC 2.0
1485         * The concurrency mode for a <code>ResultSet</code> object
1486         * that may be updated.
1487     *
1488     */

1489    int CONCUR_UPDATABLE = 1008;
1490
1491    /**
1492     * JDBC 2.0
1493     *
1494     * Returns the concurrency mode of this result set. The concurrency
1495     * used is determined by the statement that created the result set.
1496     *
1497     * @return the concurrency type, CONCUR_READ_ONLY or CONCUR_UPDATABLE
1498     * @exception SQLException if a database access error occurs
1499     */

1500    public int getConcurrency() throws SQLException JavaDoc {
1501      return CONCUR_READ_ONLY;
1502    }
1503
1504    //---------------------------------------------------------------------
1505
// Updates
1506
//---------------------------------------------------------------------
1507

1508    /**
1509     * JDBC 2.0
1510     *
1511     * Indicates whether the current row has been updated. The value returned
1512     * depends on whether or not the result set can detect updates.
1513     *
1514     * @return true if the row has been visibly updated by the owner or
1515     * another, and updates are detected
1516     * @exception SQLException if a database access error occurs
1517     *
1518     * @see DatabaseMetaData#updatesAreDetected
1519     */

1520    public boolean rowUpdated() throws SQLException JavaDoc {
1521      return false;
1522    }
1523
1524    /**
1525     * JDBC 2.0
1526     *
1527     * Indicates whether the current row has had an insertion. The value returned
1528     * depends on whether or not the result set can detect visible inserts.
1529     *
1530     * @return true if a row has had an insertion and insertions are detected
1531     * @exception SQLException if a database access error occurs
1532     *
1533     * @see DatabaseMetaData#insertsAreDetected
1534     */

1535    public boolean rowInserted() throws SQLException JavaDoc {
1536      return false;
1537    }
1538
1539    /**
1540     * JDBC 2.0
1541     *
1542     * Indicates whether a row has been deleted. A deleted row may leave
1543     * a visible "hole" in a result set. This method can be used to
1544     * detect holes in a result set. The value returned depends on whether
1545     * or not the result set can detect deletions.
1546     *
1547     * @return true if a row was deleted and deletions are detected
1548     * @exception SQLException if a database access error occurs
1549     *
1550     * @see DatabaseMetaData#deletesAreDetected
1551     */

1552    public boolean rowDeleted() throws SQLException JavaDoc {
1553      return false;
1554    }
1555
1556    /**
1557     * JDBC 2.0
1558     *
1559     * Give a nullable column a null value.
1560     *
1561     * The <code>updateXXX</code> methods are used to update column values in the
1562     * current row, or the insert row. The <code>updateXXX</code> methods do not
1563     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1564     * methods are called to update the database.
1565     *
1566     * @param columnIndex the first column is 1, the second is 2, ...
1567     * @exception SQLException if a database access error occurs
1568     */

1569    public void updateNull(int columnIndex) throws SQLException JavaDoc {
1570      throw new SQLException JavaDoc("tinySQL does not support updateNull.");
1571    }
1572
1573    /**
1574     * JDBC 2.0
1575     *
1576     * Updates a column with a boolean value.
1577     *
1578     * The <code>updateXXX</code> methods are used to update column values in the
1579     * current row, or the insert row. The <code>updateXXX</code> methods do not
1580     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1581     * methods are called to update the database.
1582     *
1583     * @param columnIndex the first column is 1, the second is 2, ...
1584     * @param x the new column value
1585     * @exception SQLException if a database access error occurs
1586     */

1587    public void updateBoolean(int columnIndex, boolean x) throws SQLException JavaDoc {
1588      throw new SQLException JavaDoc("tinySQL does not support updateBoolean.");
1589    }
1590
1591    /**
1592     * JDBC 2.0
1593     *
1594     * Updates a column with a byte value.
1595     *
1596     * The <code>updateXXX</code> methods are used to update column values in the
1597     * current row, or the insert row. The <code>updateXXX</code> methods do not
1598     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1599     * methods are called to update the database.
1600     *
1601     * @param columnIndex the first column is 1, the second is 2, ...
1602     * @param x the new column value
1603     * @exception SQLException if a database access error occurs
1604     */

1605    public void updateByte(int columnIndex, byte x) throws SQLException JavaDoc {
1606      throw new SQLException JavaDoc("tinySQL does not support updateByte.");
1607    }
1608
1609    /**
1610     * JDBC 2.0
1611     *
1612     * Updates a column with a short value.
1613     *
1614     * The <code>updateXXX</code> methods are used to update column values in the
1615     * current row, or the insert row. The <code>updateXXX</code> methods do not
1616     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1617     * methods are called to update the database.
1618     *
1619     * @param columnIndex the first column is 1, the second is 2, ...
1620     * @param x the new column value
1621     * @exception SQLException if a database access error occurs
1622     */

1623    public void updateShort(int columnIndex, short x) throws SQLException JavaDoc {
1624      throw new SQLException JavaDoc("tinySQL does not support updateShort.");
1625    }
1626
1627    /**
1628     * JDBC 2.0
1629     *
1630     * Updates a column with an integer value.
1631     *
1632     * The <code>updateXXX</code> methods are used to update column values in the
1633     * current row, or the insert row. The <code>updateXXX</code> methods do not
1634     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1635     * methods are called to update the database.
1636     *
1637     * @param columnIndex the first column is 1, the second is 2, ...
1638     * @param x the new column value
1639     * @exception SQLException if a database access error occurs
1640     */

1641    public void updateInt(int columnIndex, int x) throws SQLException JavaDoc {
1642      throw new SQLException JavaDoc("tinySQL does not support updateInt.");
1643    }
1644
1645    /**
1646     * JDBC 2.0
1647     *
1648     * Updates a column with a long value.
1649     *
1650     * The <code>updateXXX</code> methods are used to update column values in the
1651     * current row, or the insert row. The <code>updateXXX</code> methods do not
1652     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1653     * methods are called to update the database.
1654     *
1655     * @param columnIndex the first column is 1, the second is 2, ...
1656     * @param x the new column value
1657     * @exception SQLException if a database access error occurs
1658     */

1659    public void updateLong(int columnIndex, long x) throws SQLException JavaDoc {
1660      throw new SQLException JavaDoc("tinySQL does not support updateLong.");
1661    }
1662
1663    /**
1664     * JDBC 2.0
1665     *
1666     * Updates a column with a float value.
1667     *
1668     * The <code>updateXXX</code> methods are used to update column values in the
1669     * current row, or the insert row. The <code>updateXXX</code> methods do not
1670     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1671     * methods are called to update the database.
1672     *
1673     * @param columnIndex the first column is 1, the second is 2, ...
1674     * @param x the new column value
1675     * @exception SQLException if a database access error occurs
1676     */

1677    public void updateFloat(int columnIndex, float x) throws SQLException JavaDoc {
1678      throw new SQLException JavaDoc("tinySQL does not support updateFloat.");
1679    }
1680
1681    /**
1682     * JDBC 2.0
1683     *
1684     * Updates a column with a Double value.
1685     *
1686     * The <code>updateXXX</code> methods are used to update column values in the
1687     * current row, or the insert row. The <code>updateXXX</code> methods do not
1688     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1689     * methods are called to update the database.
1690     *
1691     * @param columnIndex the first column is 1, the second is 2, ...
1692     * @param x the new column value
1693     * @exception SQLException if a database access error occurs
1694     */

1695    public void updateDouble(int columnIndex, double x) throws SQLException JavaDoc {
1696      throw new SQLException JavaDoc("tinySQL does not support updateDouble.");
1697    }
1698
1699    /**
1700     * JDBC 2.0
1701     *
1702     * Updates a column with a BigDecimal value.
1703     *
1704     * The <code>updateXXX</code> methods are used to update column values in the
1705     * current row, or the insert row. The <code>updateXXX</code> methods do not
1706     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1707     * methods are called to update the database.
1708     *
1709     * @param columnIndex the first column is 1, the second is 2, ...
1710     * @param x the new column value
1711     * @exception SQLException if a database access error occurs
1712     */

1713    public void updateBigDecimal(int columnIndex, BigDecimal JavaDoc x) throws SQLException JavaDoc {
1714      throw new SQLException JavaDoc("tinySQL does not support updateBigDecimal.");
1715    }
1716
1717    /**
1718     * JDBC 2.0
1719     *
1720     * Updates a column with a String value.
1721     *
1722     * The <code>updateXXX</code> methods are used to update column values in the
1723     * current row, or the insert row. The <code>updateXXX</code> methods do not
1724     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1725     * methods are called to update the database.
1726     *
1727     * @param columnIndex the first column is 1, the second is 2, ...
1728     * @param x the new column value
1729     * @exception SQLException if a database access error occurs
1730     */

1731    public void updateString(int columnIndex, String JavaDoc x) throws SQLException JavaDoc {
1732      throw new SQLException JavaDoc("tinySQL does not support updateString.");
1733    }
1734
1735    /**
1736     * JDBC 2.0
1737     *
1738     * Updates a column with a byte array value.
1739     *
1740     * The <code>updateXXX</code> methods are used to update column values in the
1741     * current row, or the insert row. The <code>updateXXX</code> methods do not
1742     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1743     * methods are called to update the database.
1744     *
1745     * @param columnIndex the first column is 1, the second is 2, ...
1746     * @param x the new column value
1747     * @exception SQLException if a database access error occurs
1748     */

1749    public void updateBytes(int columnIndex, byte x[]) throws SQLException JavaDoc {
1750      throw new SQLException JavaDoc("tinySQL does not support updateBytes.");
1751    }
1752
1753    /**
1754     * JDBC 2.0
1755     *
1756     * Updates a column with a Date value.
1757     *
1758     * The <code>updateXXX</code> methods are used to update column values in the
1759     * current row, or the insert row. The <code>updateXXX</code> methods do not
1760     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1761     * methods are called to update the database.
1762     *
1763     * @param columnIndex the first column is 1, the second is 2, ...
1764     * @param x the new column value
1765     * @exception SQLException if a database access error occurs
1766     */

1767    public void updateDate(int columnIndex, java.sql.Date JavaDoc x) throws SQLException JavaDoc {
1768      throw new SQLException JavaDoc("tinySQL does not support updateDate.");
1769    }
1770
1771    /**
1772     * JDBC 2.0
1773     *
1774     * Updates a column with a Time value.
1775     *
1776     * The <code>updateXXX</code> methods are used to update column values in the
1777     * current row, or the insert row. The <code>updateXXX</code> methods do not
1778     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1779     * methods are called to update the database.
1780     *
1781     * @param columnIndex the first column is 1, the second is 2, ...
1782     * @param x the new column value
1783     * @exception SQLException if a database access error occurs
1784     */

1785    public void updateTime(int columnIndex, java.sql.Time JavaDoc x) throws SQLException JavaDoc {
1786      throw new SQLException JavaDoc("tinySQL does not support updateTime.");
1787    }
1788
1789    /**
1790     * JDBC 2.0
1791     *
1792     * Updates a column with a Timestamp value.
1793     *
1794     * The <code>updateXXX</code> methods are used to update column values in the
1795     * current row, or the insert row. The <code>updateXXX</code> methods do not
1796     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1797     * methods are called to update the database.
1798     *
1799     * @param columnIndex the first column is 1, the second is 2, ...
1800     * @param x the new column value
1801     * @exception SQLException if a database access error occurs
1802     */

1803    public void updateTimestamp(int columnIndex, java.sql.Timestamp JavaDoc x)
1804      throws SQLException JavaDoc {
1805        throw new SQLException JavaDoc("tinySQL does not support updateTimestamp.");
1806      }
1807
1808    /**
1809     * JDBC 2.0
1810     *
1811     * Updates a column with an ascii stream value.
1812     *
1813     * The <code>updateXXX</code> methods are used to update column values in the
1814     * current row, or the insert row. The <code>updateXXX</code> methods do not
1815     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1816     * methods are called to update the database.
1817     *
1818     * @param columnIndex the first column is 1, the second is 2, ...
1819     * @param x the new column value
1820     * @param length the length of the stream
1821     * @exception SQLException if a database access error occurs
1822     */

1823    public void updateAsciiStream(int columnIndex,
1824                           java.io.InputStream JavaDoc x,
1825                           int length) throws SQLException JavaDoc {
1826      throw new SQLException JavaDoc("tinySQL does not support updateAsciiStream.");
1827   }
1828
1829    /**
1830     * JDBC 2.0
1831     *
1832     * Updates a column with a binary stream value.
1833     *
1834     * The <code>updateXXX</code> methods are used to update column values in the
1835     * current row, or the insert row. The <code>updateXXX</code> methods do not
1836     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1837     * methods are called to update the database.
1838     *
1839     * @param columnIndex the first column is 1, the second is 2, ...
1840     * @param x the new column value
1841     * @param length the length of the stream
1842     * @exception SQLException if a database access error occurs
1843     */

1844    public void updateBinaryStream(int columnIndex,
1845                            java.io.InputStream JavaDoc x,
1846                            int length) throws SQLException JavaDoc {
1847      throw new SQLException JavaDoc("tinySQL does not support updateBinaryStream.");
1848    }
1849
1850    /**
1851     * JDBC 2.0
1852     *
1853     * Updates a column with a character stream value.
1854     *
1855     * The <code>updateXXX</code> methods are used to update column values in the
1856     * current row, or the insert row. The <code>updateXXX</code> methods do not
1857     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1858     * methods are called to update the database.
1859     *
1860     * @param columnIndex the first column is 1, the second is 2, ...
1861     * @param x the new column value
1862     * @param length the length of the stream
1863     * @exception SQLException if a database access error occurs
1864     */

1865    public void updateCharacterStream(int columnIndex,
1866                             java.io.Reader JavaDoc x,
1867                             int length) throws SQLException JavaDoc {
1868      throw new SQLException JavaDoc("tinySQL does not support updateCharacterStream.");
1869    }
1870
1871    /**
1872     * JDBC 2.0
1873     *
1874     * Updates a column with an Object value.
1875     *
1876     * The <code>updateXXX</code> methods are used to update column values in the
1877     * current row, or the insert row. The <code>updateXXX</code> methods do not
1878     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1879     * methods are called to update the database.
1880     *
1881     * @param columnIndex the first column is 1, the second is 2, ...
1882     * @param x the new column value
1883     * @param scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
1884     * this is the number of digits after the decimal. For all other
1885     * types this value will be ignored.
1886     * @exception SQLException if a database access error occurs
1887     */

1888    public void updateObject(int columnIndex, Object JavaDoc x, int scale)
1889      throws SQLException JavaDoc {
1890      throw new SQLException JavaDoc("tinySQL does not support updateObject.");
1891    }
1892
1893    /**
1894     * JDBC 2.0
1895     *
1896     * Updates a column with an Object value.
1897     *
1898     * The <code>updateXXX</code> methods are used to update column values in the
1899     * current row, or the insert row. The <code>updateXXX</code> methods do not
1900     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1901     * methods are called to update the database.
1902     *
1903     * @param columnIndex the first column is 1, the second is 2, ...
1904     * @param x the new column value
1905     * @exception SQLException if a database access error occurs
1906     */

1907    public void updateObject(int columnIndex, Object JavaDoc x) throws SQLException JavaDoc {
1908      throw new SQLException JavaDoc("tinySQL does not support updateObject.");
1909    }
1910
1911    /**
1912     * JDBC 2.0
1913     *
1914     * Updates a column with a null value.
1915     *
1916     * The <code>updateXXX</code> methods are used to update column values in the
1917     * current row, or the insert row. The <code>updateXXX</code> methods do not
1918     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1919     * methods are called to update the database.
1920     *
1921     * @param columnName the name of the column
1922     * @exception SQLException if a database access error occurs
1923     */

1924    public void updateNull(String JavaDoc columnName) throws SQLException JavaDoc {
1925      throw new SQLException JavaDoc("tinySQL does not support updateNull.");
1926    }
1927
1928    /**
1929     * JDBC 2.0
1930     *
1931     * Updates a column with a boolean value.
1932     *
1933     * The <code>updateXXX</code> methods are used to update column values in the
1934     * current row, or the insert row. The <code>updateXXX</code> methods do not
1935     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1936     * methods are called to update the database.
1937     *
1938     * @param columnName the name of the column
1939     * @param x the new column value
1940     * @exception SQLException if a database access error occurs
1941     */

1942    public void updateBoolean(String JavaDoc columnName, boolean x) throws SQLException JavaDoc {
1943      throw new SQLException JavaDoc("tinySQL does not support updateBoolean.");
1944    }
1945
1946    /**
1947     * JDBC 2.0
1948     *
1949     * Updates a column with a byte value.
1950     *
1951     * The <code>updateXXX</code> methods are used to update column values in the
1952     * current row, or the insert row. The <code>updateXXX</code> methods do not
1953     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1954     * methods are called to update the database.
1955     *
1956     * @param columnName the name of the column
1957     * @param x the new column value
1958     * @exception SQLException if a database access error occurs
1959     */

1960    public void updateByte(String JavaDoc columnName, byte x) throws SQLException JavaDoc {
1961      throw new SQLException JavaDoc("tinySQL does not support updateByte.");
1962    }
1963
1964    /**
1965     * JDBC 2.0
1966     *
1967     * Updates a column with a short value.
1968     *
1969     * The <code>updateXXX</code> methods are used to update column values in the
1970     * current row, or the insert row. The <code>updateXXX</code> methods do not
1971     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1972     * methods are called to update the database.
1973     *
1974     * @param columnName the name of the column
1975     * @param x the new column value
1976     * @exception SQLException if a database access error occurs
1977     */

1978    public void updateShort(String JavaDoc columnName, short x) throws SQLException JavaDoc {
1979      throw new SQLException JavaDoc("tinySQL does not support updateShort.");
1980    }
1981
1982    /**
1983     * JDBC 2.0
1984     *
1985     * Updates a column with an integer value.
1986     *
1987     * The <code>updateXXX</code> methods are used to update column values in the
1988     * current row, or the insert row. The <code>updateXXX</code> methods do not
1989     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
1990     * methods are called to update the database.
1991     *
1992     * @param columnName the name of the column
1993     * @param x the new column value
1994     * @exception SQLException if a database access error occurs
1995     */

1996    public void updateInt(String JavaDoc columnName, int x) throws SQLException JavaDoc {
1997      throw new SQLException JavaDoc("tinySQL does not support updateInt.");
1998    }
1999
2000    /**
2001     * JDBC 2.0
2002     *
2003     * Updates a column with a long value.
2004     *
2005     * The <code>updateXXX</code> methods are used to update column values in the
2006     * current row, or the insert row. The <code>updateXXX</code> methods do not
2007     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2008     * methods are called to update the database.
2009     *
2010     * @param columnName the name of the column
2011     * @param x the new column value
2012     * @exception SQLException if a database access error occurs
2013     */

2014    public void updateLong(String JavaDoc columnName, long x) throws SQLException JavaDoc {
2015      throw new SQLException JavaDoc("tinySQL does not support updateLong.");
2016    }
2017
2018    /**
2019     * JDBC 2.0
2020     *
2021     * Updates a column with a float value.
2022     *
2023     * The <code>updateXXX</code> methods are used to update column values in the
2024     * current row, or the insert row. The <code>updateXXX</code> methods do not
2025     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2026     * methods are called to update the database.
2027     *
2028     * @param columnName the name of the column
2029     * @param x the new column value
2030     * @exception SQLException if a database access error occurs
2031     */

2032    public void updateFloat(String JavaDoc columnName, float x) throws SQLException JavaDoc {
2033      throw new SQLException JavaDoc("tinySQL does not support updateFloat.");
2034    }
2035
2036    /**
2037     * JDBC 2.0
2038     *
2039     * Updates a column with a double value.
2040     *
2041     * The <code>updateXXX</code> methods are used to update column values in the
2042     * current row, or the insert row. The <code>updateXXX</code> methods do not
2043     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2044     * methods are called to update the database.
2045     *
2046     * @param columnName the name of the column
2047     * @param x the new column value
2048     * @exception SQLException if a database access error occurs
2049     */

2050    public void updateDouble(String JavaDoc columnName, double x) throws SQLException JavaDoc {
2051      throw new SQLException JavaDoc("tinySQL does not support updateDouble.");
2052    }
2053
2054    /**
2055     * JDBC 2.0
2056     *
2057     * Updates a column with a BigDecimal value.
2058     *
2059     * The <code>updateXXX</code> methods are used to update column values in the
2060     * current row, or the insert row. The <code>updateXXX</code> methods do not
2061     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2062     * methods are called to update the database.
2063     *
2064     * @param columnName the name of the column
2065     * @param x the new column value
2066     * @exception SQLException if a database access error occurs
2067     */

2068    public void updateBigDecimal(String JavaDoc columnName, BigDecimal JavaDoc x) throws SQLException JavaDoc {
2069      throw new SQLException JavaDoc("tinySQL does not support updateDecimal.");
2070    }
2071
2072    /**
2073     * JDBC 2.0
2074     *
2075     * Updates a column with a String value.
2076     *
2077     * The <code>updateXXX</code> methods are used to update column values in the
2078     * current row, or the insert row. The <code>updateXXX</code> methods do not
2079     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2080     * methods are called to update the database.
2081     *
2082     * @param columnName the name of the column
2083     * @param x the new column value
2084     * @exception SQLException if a database access error occurs
2085     */

2086    public void updateString(String JavaDoc columnName, String JavaDoc x) throws SQLException JavaDoc {
2087      throw new SQLException JavaDoc("tinySQL does not support updateString.");
2088    }
2089
2090    /**
2091     * JDBC 2.0
2092     *
2093     * Updates a column with a byte array value.
2094     *
2095     * The <code>updateXXX</code> methods are used to update column values in the
2096     * current row, or the insert row. The <code>updateXXX</code> methods do not
2097     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2098     * methods are called to update the database.
2099     *
2100     * @param columnName the name of the column
2101     * @param x the new column value
2102     * @exception SQLException if a database access error occurs
2103     */

2104    public void updateBytes(String JavaDoc columnName, byte x[]) throws SQLException JavaDoc {
2105      throw new SQLException JavaDoc("tinySQL does not support updateBytes.");
2106    }
2107
2108    /**
2109     * JDBC 2.0
2110     *
2111     * Updates a column with a Date value.
2112     *
2113     * The <code>updateXXX</code> methods are used to update column values in the
2114     * current row, or the insert row. The <code>updateXXX</code> methods do not
2115     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2116     * methods are called to update the database.
2117     *
2118     * @param columnName the name of the column
2119     * @param x the new column value
2120     * @exception SQLException if a database access error occurs
2121     */

2122    public void updateDate(String JavaDoc columnName, java.sql.Date JavaDoc x) throws SQLException JavaDoc {
2123      throw new SQLException JavaDoc("tinySQL does not support updateDate.");
2124    }
2125
2126    /**
2127     * JDBC 2.0
2128     *
2129     * Updates a column with a Time value.
2130     *
2131     * The <code>updateXXX</code> methods are used to update column values in the
2132     * current row, or the insert row. The <code>updateXXX</code> methods do not
2133     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2134     * methods are called to update the database.
2135     *
2136     * @param columnName the name of the column
2137     * @param x the new column value
2138     * @exception SQLException if a database access error occurs
2139     */

2140    public void updateTime(String JavaDoc columnName, java.sql.Time JavaDoc x) throws SQLException JavaDoc {
2141      throw new SQLException JavaDoc("tinySQL does not support updateTime.");
2142    }
2143
2144    /**
2145     * JDBC 2.0
2146     *
2147     * Updates a column with a Timestamp value.
2148     *
2149     * The <code>updateXXX</code> methods are used to update column values in the
2150     * current row, or the insert row. The <code>updateXXX</code> methods do not
2151     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2152     * methods are called to update the database.
2153     *
2154     * @param columnName the name of the column
2155     * @param x the new column value
2156     * @exception SQLException if a database access error occurs
2157     */

2158    public void updateTimestamp(String JavaDoc columnName, java.sql.Timestamp JavaDoc x)
2159      throws SQLException JavaDoc {
2160      throw new SQLException JavaDoc("tinySQL does not support updateTimestamp.");
2161    }
2162
2163    /**
2164     * JDBC 2.0
2165     *
2166     * Updates a column with an ascii stream value.
2167     *
2168     * The <code>updateXXX</code> methods are used to update column values in the
2169     * current row, or the insert row. The <code>updateXXX</code> methods do not
2170     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2171     * methods are called to update the database.
2172     *
2173     * @param columnName the name of the column
2174     * @param x the new column value
2175     * @param length of the stream
2176     * @exception SQLException if a database access error occurs
2177     */

2178    public void updateAsciiStream(String JavaDoc columnName,
2179                           java.io.InputStream JavaDoc x,
2180                           int length) throws SQLException JavaDoc {
2181      throw new SQLException JavaDoc("tinySQL does not support updateAsciiStream.");
2182    }
2183
2184    /**
2185     * JDBC 2.0
2186     *
2187     * Updates a column with a binary stream value.
2188     *
2189     * The <code>updateXXX</code> methods are used to update column values in the
2190     * current row, or the insert row. The <code>updateXXX</code> methods do not
2191     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2192     * methods are called to update the database.
2193     *
2194     * @param columnName the name of the column
2195     * @param x the new column value
2196     * @param length of the stream
2197     * @exception SQLException if a database access error occurs
2198     */

2199    public void updateBinaryStream(String JavaDoc columnName,
2200                            java.io.InputStream JavaDoc x,
2201                            int length) throws SQLException JavaDoc {
2202      throw new SQLException JavaDoc("tinySQL does not support updateBinaryStream.");
2203    }
2204
2205    /**
2206     * JDBC 2.0
2207     *
2208     * Updates a column with a character stream value.
2209     *
2210     * The <code>updateXXX</code> methods are used to update column values in the
2211     * current row, or the insert row. The <code>updateXXX</code> methods do not
2212     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2213     * methods are called to update the database.
2214     *
2215     * @param columnName the name of the column
2216     * @param x the new column value
2217     * @param length of the stream
2218     * @exception SQLException if a database access error occurs
2219     */

2220    public void updateCharacterStream(String JavaDoc columnName,
2221                             java.io.Reader JavaDoc reader,
2222                             int length) throws SQLException JavaDoc {
2223      throw new SQLException JavaDoc("tinySQL does not support updateCharacter.");
2224    }
2225
2226    /**
2227     * JDBC 2.0
2228     *
2229     * Updates a column with an Object value.
2230     *
2231     * The <code>updateXXX</code> methods are used to update column values in the
2232     * current row, or the insert row. The <code>updateXXX</code> methods do not
2233     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2234     * methods are called to update the database.
2235     *
2236     * @param columnName the name of the column
2237     * @param x the new column value
2238     * @param scale For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types
2239     * this is the number of digits after the decimal. For all other
2240     * types this value will be ignored.
2241     * @exception SQLException if a database access error occurs
2242     */

2243    public void updateObject(String JavaDoc columnName, Object JavaDoc x, int scale)
2244      throws SQLException JavaDoc {
2245      throw new SQLException JavaDoc("tinySQL does not support updateObject.");
2246    }
2247
2248    /**
2249     * JDBC 2.0
2250     *
2251     * Updates a column with an Object value.
2252     *
2253     * The <code>updateXXX</code> methods are used to update column values in the
2254     * current row, or the insert row. The <code>updateXXX</code> methods do not
2255     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
2256     * methods are called to update the database.
2257     *
2258     * @param columnName the name of the column
2259     * @param x the new column value
2260     * @exception SQLException if a database access error occurs
2261     */

2262    public void updateObject(String JavaDoc columnName, Object JavaDoc x) throws SQLException JavaDoc {
2263      throw new SQLException JavaDoc("tinySQL does not support updateObject.");
2264    }
2265
2266    /**
2267     * JDBC 2.0
2268     *
2269     * Inserts the contents of the insert row into the result set and
2270     * the database. Must be on the insert row when this method is called.
2271     *
2272     * @exception SQLException if a database access error occurs,
2273     * if called when not on the insert row, or if not all of non-nullable columns in
2274     * the insert row have been given a value
2275     */

2276    public void insertRow() throws SQLException JavaDoc {
2277      throw new SQLException JavaDoc("tinySQL does not support insertRow.");
2278    }
2279
2280    /**
2281     * JDBC 2.0
2282     *
2283     * Updates the underlying database with the new contents of the
2284     * current row. Cannot be called when on the insert row.
2285     *
2286     * @exception SQLException if a database access error occurs or
2287     * if called when on the insert row
2288     */

2289    public void updateRow() throws SQLException JavaDoc {
2290      throw new SQLException JavaDoc("tinySQL does not support updateRow.");
2291    }
2292
2293    /**
2294     * JDBC 2.0
2295     *
2296     * Deletes the current row from the result set and the underlying
2297     * database. Cannot be called when on the insert row.
2298     *
2299     * @exception SQLException if a database access error occurs or if
2300     * called when on the insert row.
2301     */

2302    public void deleteRow() throws SQLException JavaDoc {
2303      throw new SQLException JavaDoc("tinySQL does not support deleteRow.");
2304    }
2305
2306    /**
2307     * JDBC 2.0
2308     *
2309     * Refreshes the current row with its most recent value in
2310     * the database. Cannot be called when on the insert row.
2311     *
2312     * The <code>refreshRow</code> method provides a way for an application to
2313     * explicitly tell the JDBC driver to refetch a row(s) from the
2314     * database. An application may want to call <code>refreshRow</code> when
2315     * caching or prefetching is being done by the JDBC driver to
2316     * fetch the latest value of a row from the database. The JDBC driver
2317     * may actually refresh multiple rows at once if the fetch size is
2318     * greater than one.
2319     *
2320     * All values are refetched subject to the transaction isolation
2321     * level and cursor sensitivity. If <code>refreshRow</code> is called after
2322     * calling <code>updateXXX</code>, but before calling <code>updateRow</code>, then the
2323     * updates made to the row are lost. Calling the method <code>refreshRow</code> frequently
2324     * will likely slow performance.
2325     *
2326     * @exception SQLException if a database access error occurs or if
2327     * called when on the insert row
2328     */

2329    public void refreshRow() throws SQLException JavaDoc {
2330      throw new SQLException JavaDoc("tinySQL does not support RefreshRow.");
2331    }
2332
2333    /**
2334     * JDBC 2.0
2335     *
2336         * Cancels the updates made to a row.
2337     * This method may be called after calling an
2338     * <code>updateXXX</code> method(s) and before calling <code>updateRow</code> to rollback
2339     * the updates made to a row. If no updates have been made or
2340     * <code>updateRow</code> has already been called, then this method has no
2341     * effect.
2342     *
2343     * @exception SQLException if a database access error occurs or if
2344     * called when on the insert row
2345     *
2346     */

2347    public void cancelRowUpdates() throws SQLException JavaDoc {
2348      throw new SQLException JavaDoc("tinySQL does not support cancelRowUpdate.");
2349    }
2350
2351    /**
2352     * JDBC 2.0
2353     *
2354     * Moves the cursor to the insert row. The current cursor position is
2355     * remembered while the cursor is positioned on the insert row.
2356     *
2357     * The insert row is a special row associated with an updatable
2358     * result set. It is essentially a buffer where a new row may
2359     * be constructed by calling the <code>updateXXX</code> methods prior to
2360     * inserting the row into the result set.
2361     *
2362     * Only the <code>updateXXX</code>, <code>getXXX</code>,
2363         * and <code>insertRow</code> methods may be
2364     * called when the cursor is on the insert row. All of the columns in
2365     * a result set must be given a value each time this method is
2366     * called before calling <code>insertRow</code>.
2367         * The method <code>updateXXX</code> must be called before a
2368     * <code>getXXX</code> method can be called on a column value.
2369     *
2370     * @exception SQLException if a database access error occurs
2371     * or the result set is not updatable
2372     */

2373    public void moveToInsertRow() throws SQLException JavaDoc {
2374      throw new SQLException JavaDoc("tinySQL does not support moveToInsertRow.");
2375    }
2376
2377    /**
2378     * JDBC 2.0
2379     *
2380     * Moves the cursor to the remembered cursor position, usually the
2381     * current row. This method has no effect if the cursor is not on the insert
2382     * row.
2383     *
2384     * @exception SQLException if a database access error occurs
2385     * or the result set is not updatable
2386     */

2387    public void moveToCurrentRow() throws SQLException JavaDoc {
2388      throw new SQLException JavaDoc("tinySQL does not support moveToCurrentRow.");
2389    }
2390
2391    /**
2392     * JDBC 2.0
2393     *
2394     * Returns the Statement that produced this <code>ResultSet</code> object.
2395         * If the result set was generated some other way, such as by a
2396         * <code>DatabaseMetaData</code> method, this method returns <code>null</code>.
2397     *
2398     * @return the Statment that produced the result set or
2399     * null if the result set was produced some other way
2400     * @exception SQLException if a database access error occurs
2401     */

2402    public Statement JavaDoc getStatement() throws SQLException JavaDoc {
2403      return statement;
2404    }
2405
2406    /**
2407     * JDBC 2.0
2408     *
2409     * Returns the value of a column in the current row as a Java object.
2410         * This method uses the given <code>Map</code> object
2411     * for the custom mapping of the
2412     * SQL structured or distinct type that is being retrieved.
2413     *
2414     * @param i the first column is 1, the second is 2, ...
2415     * @param map the mapping from SQL type names to Java classes
2416     * @return an object representing the SQL value
2417     */

2418    public Object JavaDoc getObject(int i, java.util.Map JavaDoc map) throws SQLException JavaDoc {
2419      throw new SQLException JavaDoc("tinySQL does not support getObject.");
2420    }
2421
2422    /**
2423     * JDBC 2.0
2424     *
2425     * Gets a REF(&lt;structured-type&gt;) column value from the current row.
2426     *
2427     * @param i the first column is 1, the second is 2, ...
2428     * @return a <code>Ref</code> object representing an SQL REF value
2429     */

2430    public Ref JavaDoc getRef(int i) throws SQLException JavaDoc {
2431      throw new SQLException JavaDoc("tinySQL does not support getRef.");
2432    }
2433
2434    /**
2435     * JDBC 2.0
2436     *
2437     * Gets a BLOB value in the current row of this <code>ResultSet</code> object.
2438     *
2439     * @param i the first column is 1, the second is 2, ...
2440     * @return a <code>Blob</code> object representing the SQL BLOB value in
2441         * the specified column
2442     */

2443    public Blob JavaDoc getBlob(int i) throws SQLException JavaDoc {
2444      throw new SQLException JavaDoc("tinySQL does not support getBlob.");
2445    }
2446
2447    /**
2448     * JDBC 2.0
2449     *
2450     * Gets a CLOB value in the current row of this <code>ResultSet</code> object.
2451     *
2452     * @param i the first column is 1, the second is 2, ...
2453     * @return a <code>Clob</code> object representing the SQL CLOB value in
2454         * the specified column
2455     */

2456    public Clob JavaDoc getClob(int i) throws SQLException JavaDoc {
2457      throw new SQLException JavaDoc("tinySQL does not support getClob.");
2458    }
2459
2460    /**
2461     * JDBC 2.0
2462     *
2463     * Gets an SQL ARRAY value from the current row of this <code>ResultSet</code> object.
2464     *
2465     * @param i the first column is 1, the second is 2, ...
2466     * @return an <code>Array</code> object representing the SQL ARRAY value in
2467         * the specified column
2468     */

2469    public Array JavaDoc getArray(int i) throws SQLException JavaDoc {
2470      throw new SQLException JavaDoc("tinySQL does not support getArray.");
2471    }
2472
2473    /**
2474     * JDBC 2.0
2475     *
2476     * Returns the value in the specified column as a Java object.
2477         * This method uses the specified <code>Map</code> object for
2478         * custom mapping if appropriate.
2479     *
2480     * @param colName the name of the column from which to retrieve the value
2481     * @param map the mapping from SQL type names to Java classes
2482     * @return an object representing the SQL value in the specified column
2483     */

2484    public Object JavaDoc getObject(String JavaDoc colName, java.util.Map JavaDoc map) throws SQLException JavaDoc {
2485      throw new SQLException JavaDoc("tinySQL does not support getObject.");
2486    }
2487
2488    /**
2489     * JDBC 2.0
2490     *
2491     * Gets a REF(&lt;structured-type&gt;) column value from the current row.
2492     *
2493     * @param colName the column name
2494     * @return a <code>Ref</code> object representing the SQL REF value in
2495         * the specified column
2496     */

2497    public Ref JavaDoc getRef(String JavaDoc colName) throws SQLException JavaDoc {
2498      throw new SQLException JavaDoc("tinySQL does not support getRef.");
2499    }
2500
2501    /**
2502     * JDBC 2.0
2503     *
2504     * Gets a BLOB value in the current row of this <code>ResultSet</code> object.
2505     *
2506     * @param colName the name of the column from which to retrieve the value
2507     * @return a <code>Blob</code> object representing the SQL BLOB value in
2508         * the specified column
2509     */

2510    public Blob JavaDoc getBlob(String JavaDoc colName) throws SQLException JavaDoc {
2511      throw new SQLException JavaDoc("tinySQL does not support getBlob.");
2512    }
2513
2514    /**
2515     * JDBC 2.0
2516     *
2517     * Gets a CLOB value in the current row of this <code>ResultSet</code> object.
2518     *
2519     * @param colName the name of the column from which to retrieve the value
2520     * @return a <code>Clob</code> object representing the SQL CLOB value in
2521         * the specified column
2522     */

2523    public Clob JavaDoc getClob(String JavaDoc colName) throws SQLException JavaDoc {
2524      throw new SQLException JavaDoc("tinySQL does not support getClob.");
2525    }
2526
2527    /**
2528     * JDBC 2.0
2529     *
2530     * Gets an SQL ARRAY value in the current row of this <code>ResultSet</code> object.
2531     *
2532     * @param colName the name of the column from which to retrieve the value
2533     * @return an <code>Array</code> object representing the SQL ARRAY value in
2534         * the specified column
2535     */

2536    public Array JavaDoc getArray(String JavaDoc colName) throws SQLException JavaDoc {
2537      throw new SQLException JavaDoc("tinySQL does not support getArray.");
2538    }
2539
2540    /**
2541     * JDBC 2.0
2542     *
2543     * Gets the value of a column in the current row as a java.sql.Date
2544     * object. This method uses the given calendar to construct an appropriate millisecond
2545     * value for the Date if the underlying database does not store
2546     * timezone information.
2547     *
2548     * @param columnIndex the first column is 1, the second is 2, ...
2549     * @param cal the calendar to use in constructing the date
2550     * @return the column value; if the value is SQL NULL, the result is null
2551     * @exception SQLException if a database access error occurs
2552     */

2553    public java.sql.Date JavaDoc getDate(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
2554      throw new SQLException JavaDoc("tinySQL does not support getDate.");
2555    }
2556
2557    /**
2558     * Gets the value of a column in the current row as a java.sql.Date
2559     * object. This method uses the given calendar to construct an appropriate millisecond
2560     * value for the Date, if the underlying database does not store
2561     * timezone information.
2562     *
2563     * @param columnName the SQL name of the column from which to retrieve the value
2564     * @param cal the calendar to use in constructing the date
2565     * @return the column value; if the value is SQL NULL, the result is null
2566     * @exception SQLException if a database access error occurs
2567     */

2568    public java.sql.Date JavaDoc getDate(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc {
2569      throw new SQLException JavaDoc("tinySQL does not support getDate.");
2570    }
2571
2572    /**
2573     * Gets the value of a column in the current row as a java.sql.Time
2574     * object. This method uses the given calendar to construct an appropriate millisecond
2575     * value for the Time if the underlying database does not store
2576     * timezone information.
2577     *
2578     * @param columnIndex the first column is 1, the second is 2, ...
2579     * @param cal the calendar to use in constructing the time
2580     * @return the column value; if the value is SQL NULL, the result is null
2581     * @exception SQLException if a database access error occurs
2582     */

2583    public java.sql.Time JavaDoc getTime(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc {
2584      throw new SQLException JavaDoc("tinySQL does not support getTime.");
2585    }
2586
2587    /**
2588     * Gets the value of a column in the current row as a java.sql.Time
2589     * object. This method uses the given calendar to construct an appropriate millisecond
2590     * value for the Time if the underlying database does not store
2591     * timezone information.
2592     *
2593     * @param columnName the SQL name of the column
2594     * @param cal the calendar to use in constructing the time
2595     * @return the column value; if the value is SQL NULL, the result is null
2596     * @exception SQLException if a database access error occurs
2597     */

2598    public java.sql.Time JavaDoc getTime(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc {
2599      throw new SQLException JavaDoc("tinySQL does not support getTime.");
2600    }
2601
2602    /**
2603     * Gets the value of a column in the current row as a java.sql.Timestamp
2604     * object. This method uses the given calendar to construct an appropriate millisecond
2605     * value for the Timestamp if the underlying database does not store
2606     * timezone information.
2607     *
2608     * @param columnIndex the first column is 1, the second is 2, ...
2609     * @param cal the calendar to use in constructing the timestamp
2610     * @return the column value; if the value is SQL NULL, the result is null
2611     * @exception SQLException if a database access error occurs
2612     */

2613    public java.sql.Timestamp JavaDoc getTimestamp(int columnIndex, Calendar JavaDoc cal)
2614      throws SQLException JavaDoc {
2615      throw new SQLException JavaDoc("tinySQL does not support getTimestamp.");
2616    }
2617
2618    /**
2619     * Gets the value of a column in the current row as a java.sql.Timestamp
2620     * object. This method uses the given calendar to construct an appropriate millisecond
2621     * value for the Timestamp if the underlying database does not store
2622     * timezone information.
2623     *
2624     * @param columnName the SQL name of the column
2625     * @param cal the calendar to use in constructing the timestamp
2626     * @return the column value; if the value is SQL NULL, the result is null
2627     * @exception SQLException if a database access error occurs
2628     */

2629    public java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc columnName, Calendar JavaDoc cal)
2630      throws SQLException JavaDoc {
2631      throw new SQLException JavaDoc("tinySQL does not support getTimestamp.");
2632    }
2633
2634}
2635
Popular Tags