Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Performance Pin
J. Dunlap19-Aug-03 16:50
J. Dunlap19-Aug-03 16:50 
GeneralRe: C# Performance Pin
Ista19-Aug-03 17:01
Ista19-Aug-03 17:01 
GeneralRe: C# Performance Pin
Rocky Moore19-Aug-03 22:16
Rocky Moore19-Aug-03 22:16 
GeneralRe: C# Performance Pin
Julian Bucknall [MSFT]20-Aug-03 11:05
Julian Bucknall [MSFT]20-Aug-03 11:05 
GeneralRe: C# Performance Pin
Jack Puppy20-Aug-03 14:09
Jack Puppy20-Aug-03 14:09 
GeneralRe: C# Performance Pin
J. Dunlap19-Aug-03 17:33
J. Dunlap19-Aug-03 17:33 
GeneralGraphics vs GraphicsPath Pin
Gregory Bush19-Aug-03 11:16
Gregory Bush19-Aug-03 11:16 
Generaltricky sql & data set question Pin
mikemilano19-Aug-03 10:48
mikemilano19-Aug-03 10:48 
is it possible to loop through each row of a dataset table, and populate the new column based on another column in the same row?

i have a Contacts class, and a Message Center class. Each get their information from completely different databases, and reference only by the ContactID. ( the messages table in its database only has a contactid field .. not a contact name field )

The constructor of the Contact class takes the ContactID as the argument.

I want to create a dataset of the last 50 messages and have the Contact Name in the same data set.

for example:
<br />
. . . . . . . .<br />
string sql = "SELECT ContactID,Message from Messages ORDER BY MessageID DESC LIMIT 50";<br />
SqlDataAdapter da = new SqlDataAdapter(sql,con);<br />
ds = new DataSet();<br />
da.Fill(ds,"Messages");<br />
<br />
ds.Tables["Messages"].Columns.Add("ContactName");<br />


Now how would I iterate through each row of the Messages.ContactID table, and populate the Messages.ContactName field of the same row ?

I hope I made sense =/ .. Thanks for reading this.
GeneralRe: tricky sql & data set question Pin
mikemilano19-Aug-03 10:58
mikemilano19-Aug-03 10:58 
GeneralRe: tricky sql &amp; data set question Pin
Ista19-Aug-03 16:51
Ista19-Aug-03 16:51 
GeneralRe: tricky sql &amp; data set question Pin
A.Wegierski19-Aug-03 19:18
A.Wegierski19-Aug-03 19:18 
GeneralRe: tricky sql &amp; data set question Pin
Ista20-Aug-03 3:19
Ista20-Aug-03 3:19 
GeneralRe: tricky sql & data set question Pin
A.Wegierski20-Aug-03 19:20
A.Wegierski20-Aug-03 19:20 
GeneralRe: tricky sql &amp; data set question Pin
Ista21-Aug-03 3:22
Ista21-Aug-03 3:22 
GeneralRe: tricky sql &amp; data set question Pin
Ista21-Aug-03 3:50
Ista21-Aug-03 3:50 
GeneralRe: tricky sql &amp; data set question Pin
A.Wegierski24-Aug-03 22:29
A.Wegierski24-Aug-03 22:29 
GeneralI formated my drive along with my project Pin
mdolby19-Aug-03 10:11
mdolby19-Aug-03 10:11 
GeneralRe: I formated my drive along with my project Pin
J. Dunlap19-Aug-03 10:18
J. Dunlap19-Aug-03 10:18 
QuestionHow do I find a file associated icon? Pin
Lars Fisker19-Aug-03 9:17
Lars Fisker19-Aug-03 9:17 
AnswerRe: How do I find a file associated icon? Pin
Heath Stewart19-Aug-03 9:46
protectorHeath Stewart19-Aug-03 9:46 
GeneralRe: How do I find a file associated icon? Pin
Lars Fisker19-Aug-03 10:48
Lars Fisker19-Aug-03 10:48 
QuestionTrapping the enter key? Pin
BoozeBomb19-Aug-03 8:57
BoozeBomb19-Aug-03 8:57 
AnswerRe: Trapping the enter key? Pin
Heath Stewart19-Aug-03 9:14
protectorHeath Stewart19-Aug-03 9:14 
GeneralRe: Trapping the enter key? Pin
BoozeBomb19-Aug-03 9:25
BoozeBomb19-Aug-03 9:25 
Generalasync delegates Pin
devvvy19-Aug-03 8:32
devvvy19-Aug-03 8:32 

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.