|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Table.Select and Strong Data Typed DataSetsI’m using Strong Data Types DataSets. Using it is great for several reasons,
one of them is creating new rows using NewTableRow, this row is not a simple DataRow, but a complex DataRow with table fields as properties, xmlSchemaWriting, etc.. But when you perform table.Select it returns a simple DataRow(), then you are forced to access each field using field names and columnCollections. Is there a way to perform a table.Select and having an array TableRow() as a result? -- Thanks in advance Rafael You are not forced to use field names and columnCollections.
Please try something like this: For each row As As MyTypedDataSet.MyTableRow in MyTypedDatasetInstance.MyTable.Select( .... ) Debug.WriteLine ( row.SomeField.ToString() ) Next Regards from Madrid (Spain) Jesús López VB MVP Show quote "Rafael" <Raf***@discussions.microsoft.com> escribió en el mensaje news:A53A9C78-0D96-4ED5-BD39-608D59BF78A3@microsoft.com... > I'm using Strong Data Types DataSets. Using it is great for several > reasons, > one of them is creating new rows using NewTableRow, this row is not a > simple > DataRow, but a complex DataRow with table fields as properties, > xmlSchemaWriting, etc.. > > But when you perform table.Select it returns a simple DataRow(), then you > are forced to access each field using field names and columnCollections. > Is > there a way to perform a table.Select and having an array TableRow() as a > result? > > -- > Thanks in advance > > Rafael Rafael wrote:
> I’m using Strong Data Types DataSets. Using it is great for several reasons, You can simply cast the return value of Select, like this:> one of them is creating new rows using NewTableRow, this row is not a simple > DataRow, but a complex DataRow with table fields as properties, > xmlSchemaWriting, etc.. > > But when you perform table.Select it returns a simple DataRow(), then you > are forced to access each field using field names and columnCollections. Is > there a way to perform a table.Select and having an array TableRow() as a > result? myTableRow[] rows = (myTableRow[])myTable.Select("..."); |
|||||||||||||||||||||||