1 33 34 35 package com.internetcds.jdbc.tds; 36 37 38 import java.util.Vector ; 39 40 41 46 public class PacketRowResult extends PacketResult 47 { 48 public static final String cvsVersion = "$Id: PacketRowResult.java,v 1.1 2006/06/23 10:39:04 sinisa Exp $"; 49 50 51 Vector row = null; 52 int columnCount = -1; 53 54 55 public PacketRowResult( 56 int columnCount_) 57 { 58 super(TdsDefinitions.TDS_ROW_TOKEN); 59 60 columnCount = columnCount_; 61 row = new Vector (); 62 row.setSize(columnCount_); 63 } 64 65 66 78 public void setElementAt( 79 Object obj, 80 int index) 81 throws TdsException 82 { 83 if (index<1 || index>columnCount) 84 { 85 throw new TdsException("Bad index " + index); 86 } 87 88 row.setElementAt(obj, index-1); 89 } 90 91 92 93 102 public Object getElementAt( 103 int index) 104 throws TdsException 105 { 106 if (index<1 || index>columnCount) 107 { 108 throw new TdsException("Bad index " + index); 109 } 110 111 return row.elementAt(index-1); 112 } 113 114 115 } 116 | Popular Tags |