Trying to get like this...

ThienZ

Well-known member
Joined
Feb 10, 2005
Messages
45
Location
Germany
im trying to get a "typisierte" DataSet like this: (from MSDN)
C#:
// This accesses the CustomerID column in the first row of 
// the Customers table.
string s;
s = dsCustomersOrders1.Customers[0].CustomerID;

what do you call for "typisiert"? (My MSDN is in german, so i dont know the english word)

i tried to look in MSDN but didnt find an example code for making "typisierte" DataSet. Should i extend the DataSet like this?
C#:
	public class DataSetExt : DataSet 
	{
		//... with all set and get for each specific tables and column names 
 	}

or how should i do it?

thx in advance. :)
 
I imagine a typisiert is a strongly typed dataset, this means that the columns are added into the datatable by you, given names, parameters set etc

This is my understanding anyway
 
and how can i do that?

i tried to write like this:
C#:
	public class DataSetExt : DataSet 
	{
		private int pos_objadr1;

		public DataTable OL 
		{
			get 
			{
				return this.Tables["OL"];
			}

			public objadr1 
			{
				return this.Tables["OL"].Columns[pos_objadr1];
			}
		}
	}

with this i can write "myDataSetExt.OL" to get the table "OL", right?

but what should i do so i can write "myDataSetExt.OL(1).objadr1" to get line 1 column pos_objadr1 from table OL?
i tried to make objadr1 inside OL like up there, but it doesnt work....


Thx.
 
Back
Top