ThienZ Posted March 3, 2005 Posted March 3, 2005 i'm trying to get a "typisierte" DataSet like this: (from MSDN) // 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 don't know the english word) i tried to look in MSDN but didn't find an example code for making "typisierte" DataSet. Should i extend the DataSet like this? 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. :) Quote
stustarz Posted March 3, 2005 Posted March 3, 2005 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 Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
ThienZ Posted March 3, 2005 Author Posted March 3, 2005 and how can i do that? i tried to write like this: 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 doesn't work.... Thx. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.