Click here to Skip to main content
15,892,161 members
Home / Discussions / Database
   

Database

 
QuestionSelect Pin
NormBohana21-Sep-05 15:09
NormBohana21-Sep-05 15:09 
AnswerRe: Select Pin
Christian Graus21-Sep-05 15:38
protectorChristian Graus21-Sep-05 15:38 
AnswerRe: Select Pin
miah alom22-Sep-05 3:26
miah alom22-Sep-05 3:26 
QuestionStored Query in Access Pin
kornstyle21-Sep-05 8:53
kornstyle21-Sep-05 8:53 
AnswerRe: Stored Query in Access Pin
Christian Graus21-Sep-05 15:40
protectorChristian Graus21-Sep-05 15:40 
QuestionUpdate Pin
Illegal Operation21-Sep-05 2:29
Illegal Operation21-Sep-05 2:29 
AnswerRe: Update Pin
Christian Graus21-Sep-05 15:39
protectorChristian Graus21-Sep-05 15:39 
QuestionExpression column in a Datatable not evaluating Pin
convergence21-Sep-05 0:22
convergence21-Sep-05 0:22 
Good Evening,

I'm working with C# code which presents a dataset with an id and name column, it also has an added expression column to concatentate the two as follows:

DataColumn aggregateCol = new DataColumn();
aggregateCol.DataType = System.Type.GetType("System.String");
aggregateCol.ColumnName = "strConcat";
aggregateCol.Expression = "Convert(id, System.String) + ' ' + name";
concatTable.Columns.Add(aggregateCol);

concatTable is passed to this code as: this.downtimeData.Tables["Equipment"]

to Test the result I printed the contents of the Datatable after it had been merged with a populated dataset as follows:

this.downtimeData.Merge(downtimeData);
System.Diagnostics.Debug.WriteLine(this.downtimeData.Tables["Equipment"].Rows.Count);
System.Diagnostics.Debug.WriteLine(this.downtimeData.Tables["Equipment"].Rows[0].ItemArray[0] + " " +
this.downtimeData.Tables["Equipment"].Rows[0].ItemArray[1] + " " +
this.downtimeData.Tables["Equipment"].Rows[0].ItemArray[2]);

And the perplexing print out reads:

3
1 spoon

WTF | :WTF: Why does the strConcat field not contain a value?

Thanks in advance

A chicken is just an eggs was of making more eggs

-- modified at 6:20 Wednesday 21st September, 2005

A chicken is just an eggs way of making more eggs
AnswerRe: Expression column in a Datatable not evaluating Pin
sreejith ss nair21-Sep-05 0:49
sreejith ss nair21-Sep-05 0:49 
GeneralRe: Expression column in a Datatable not evaluating Pin
convergence21-Sep-05 2:36
convergence21-Sep-05 2:36 
GeneralThe Solution Pin
convergence21-Sep-05 17:08
convergence21-Sep-05 17:08 
Questiondataset size limits... Pin
l a u r e n20-Sep-05 18:54
l a u r e n20-Sep-05 18:54 
AnswerRe: dataset size limits... Pin
Andy Brummer20-Sep-05 19:46
sitebuilderAndy Brummer20-Sep-05 19:46 
Questionxml schemas... Pin
l a u r e n20-Sep-05 17:11
l a u r e n20-Sep-05 17:11 
AnswerRe: xml schemas... Pin
Andy Brummer20-Sep-05 19:54
sitebuilderAndy Brummer20-Sep-05 19:54 
QuestionBest practices for user defined fields Pin
econner20-Sep-05 16:42
econner20-Sep-05 16:42 
AnswerRe: Best practices for user defined fields Pin
Edbert P20-Sep-05 18:27
Edbert P20-Sep-05 18:27 
AnswerRe: Best practices for user defined fields Pin
Andy Brummer20-Sep-05 20:01
sitebuilderAndy Brummer20-Sep-05 20:01 
QuestionDatabound ComboBox Selection Problems Pin
Glenn E. Lanier II20-Sep-05 15:33
Glenn E. Lanier II20-Sep-05 15:33 
AnswerRe: Databound ComboBox Selection Problems Pin
sreejith ss nair22-Sep-05 1:06
sreejith ss nair22-Sep-05 1:06 
AnswerRe: Databound ComboBox Selection Problems Pin
Glenn E. Lanier II2-Mar-06 8:36
Glenn E. Lanier II2-Mar-06 8:36 
AnswerRe: Databound ComboBox Selection Problems Pin
miah alom22-Sep-05 3:23
miah alom22-Sep-05 3:23 
QuestionSelecting distinct values Pin
Filipe Peixinho20-Sep-05 12:28
Filipe Peixinho20-Sep-05 12:28 
AnswerRe: Selecting distinct values Pin
enjoycrack20-Sep-05 17:17
enjoycrack20-Sep-05 17:17 
GeneralRe: Selecting distinct values Pin
Filipe Peixinho21-Sep-05 0:55
Filipe Peixinho21-Sep-05 0:55 

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.