Example #1
0
		public void SelectAllIndivColumns()
		{
			MIDataReader rdr = null;
			string projectionlist = "obj, MI_Key, MI_Grid, MI_Style";
			rdr = _miTable.ExecuteReader(projectionlist);
			
			string name;
			string typename;
			int n = rdr.FieldCount;
			if(rdr.Read())
			{
				n = rdr.FieldCount;//shouldn't change
				for(int i =0; i <n; i++)
				{
					name = rdr.GetName(i);
					typename = rdr.GetDataTypeName(i);
					if(typename == "MapInfo.Styles.Style")
					{
						_mStyle = rdr.GetStyle(i) as GridStyle; 
					}
					else if(typename == "MapInfo.Geometry.FeatureGeometry")
					{
						_mObject = rdr.GetFeatureGeometry(i);
					}
					else if(typename == "MapInfo.Data.Key")
					{
						_mKey = rdr.GetKey(i);
					}
					else if (typename == "MapInfo.Raster.GridInfo")
					{
						_mGridInfo = rdr.GetGridInfo(i);
					}
				}
			}

			rdr.Close();
			rdr.Dispose();
			rdr = null;
		}