Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
GeneralOn-Screen Keyboard Pin
raki100427-May-04 11:03
raki100427-May-04 11:03 
GeneralVSPackage load failure after incorporating a PLK for the vspackage. Pin
ManSus27-May-04 10:38
ManSus27-May-04 10:38 
QuestionHow do I copy a file and display progress? Pin
Tony Archer27-May-04 10:35
Tony Archer27-May-04 10:35 
AnswerRe: How do I copy a file and display progress? Pin
Guinness4Strength27-May-04 11:42
Guinness4Strength27-May-04 11:42 
AnswerRe: How do I copy a file and display progress? Pin
Dave Kreskowiak27-May-04 11:43
mveDave Kreskowiak27-May-04 11:43 
GeneralRe: How do I copy a file and display progress? Pin
Jonathan Slenders28-May-04 0:28
Jonathan Slenders28-May-04 0:28 
GeneralRe: wsdl converter Pin
mjmcinto27-May-04 10:12
mjmcinto27-May-04 10:12 
GeneralDataTable.Select and Expressions Pin
rog103927-May-04 9:18
rog103927-May-04 9:18 
I have a question about how to get certain data from my dataset. I am trying to get rows from one table that have certain child relations to appear.

I have a table called stories. The table stories has 5 child relations. One relation goes to each table. One table, called categories, is a child of stories. The categories table has three columns.
1. id int
2. storyid string
3. catid int
id is just a sequential number as the primary key of the table. storyid is the number of the id of the story this entry in the category table belongs to. catid is a number that corresponds to a entry in the categoryinfo table.

So my idea is to select certain stories that have a given catid. So, for example, say I want to see all the stories that have 5 as a catid. What I am trying to do now is to use the select method available to tables. So the few lines of code are this:

//Notitia is the name of the class for the typeddataset I use.

storiesfiltered = new Notitia.StoriesDataTable();
string fil = "Child(storiescategories).catid = 5";
DataRow[] drows = stories.Select( fil );

foreach( DataRow row in drows )
{
storiesfiltered.ImportRow( row );
}

However, whenever I run this code i get an error at the stories.select line and the error says "Cannot interpret token 'Child' at position 1." I'm not sure why I get this error. I checked msdn about expressions and that is how it told me to write expressions involving relations to child tables.

If anyone has any ideas why that doesn't work or another way to do it I would appreciate the help. Thanks.

Paul Rogero
GeneralRe: DataTable.Select and Expressions Pin
Heath Stewart27-May-04 10:03
protectorHeath Stewart27-May-04 10:03 
GeneralRe: DataTable.Select and Expressions Pin
rog103927-May-04 10:26
rog103927-May-04 10:26 
GeneralDataset XML Diff Pin
MrJJKoolJ27-May-04 8:42
MrJJKoolJ27-May-04 8:42 
GeneralRe: Dataset XML Diff Pin
Dave Kreskowiak27-May-04 9:50
mveDave Kreskowiak27-May-04 9:50 
GeneralInserting SQLSever rows Pin
ABean27-May-04 8:41
ABean27-May-04 8:41 
GeneralRe: Inserting SQLSever rows Pin
Heath Stewart27-May-04 10:01
protectorHeath Stewart27-May-04 10:01 
GeneralRe: Inserting SQLSever rows Pin
Andy Brummer27-May-04 10:07
sitebuilderAndy Brummer27-May-04 10:07 
GeneralHot Keys on Tab Page Text Pin
UTRocketFan27-May-04 7:55
UTRocketFan27-May-04 7:55 
GeneralRe: Hot Keys on Tab Page Text Pin
Heath Stewart27-May-04 8:19
protectorHeath Stewart27-May-04 8:19 
Generaldeploying assembly Pin
Ammar Ben Hadj Amor27-May-04 7:40
professionalAmmar Ben Hadj Amor27-May-04 7:40 
GeneralRe: deploying assembly Pin
Heath Stewart27-May-04 8:14
protectorHeath Stewart27-May-04 8:14 
GeneralBinding.Format to a Datagrid Column Pin
Anfernius27-May-04 7:11
Anfernius27-May-04 7:11 
GeneralRe: Binding.Format to a Datagrid Column Pin
Heath Stewart27-May-04 8:12
protectorHeath Stewart27-May-04 8:12 
GeneralRe: Binding.Format to a Datagrid Column Pin
Anfernius27-May-04 8:32
Anfernius27-May-04 8:32 
GeneralRe: Binding.Format to a Datagrid Column Pin
Heath Stewart27-May-04 8:35
protectorHeath Stewart27-May-04 8:35 
GeneralClosing a Worker Thread when Dialog Closes Pin
Guinness4Strength27-May-04 5:37
Guinness4Strength27-May-04 5:37 
GeneralRe: Closing a Worker Thread when Dialog Closes Pin
scadaguy27-May-04 10:44
scadaguy27-May-04 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.