Exemple #1
0
		protected void init(string TableName, Db Database)
		{
			//this.ConnStr = ConnStr;
			//BelongDbType = Type;
			this.Database = Database;
			ds = new DataSet();
			try
			{
				da = Database.GetAdapter("select top 1 * from " + TableName);
				//da = DbHelper.GetAdapter(`"select top 1 * from " + TableName, ConnStr, Type);
			}
			catch (Exception e)
			{
				Exceptions.LogOnly(e);
				throw e;
			}
			dt = da.FillSchema(ds, SchemaType.Source)[0];
			this.TableName = TableName;
			this.PrimaryField = dt.Columns[0].ColumnName;
		}