need some .NET help

Martin

Lifer
Jan 15, 2000
29,178
1
81
been trying to get a simple web service running but DataSet returns weird results. My code is much like all the tutorials/examples:

SqlConnection CBMCon = new SqlConnection(cString);
CBMCon.Open();
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.set_SelectCommand(new SqlCommand("SELECT xxxFROM yyy, nodeInfo WHERE zzz = 47", CBMCon));

DataSet result = new DataSet();
adapter.Fill(result);

the problem is, this returns multiple tables with 1 entry each, rather than 1 table with multiple rows. Am I missing something?
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Are you sure that's what is happening? Never seen that behavior. Are you looking at the output XML or using the debugger? The output XML kind of looks like it has one table per row, but this is not actually the case.
 

Martin

Lifer
Jan 15, 2000
29,178
1
81
Originally posted by: torpid
Are you sure that's what is happening? Never seen that behavior. Are you looking at the output XML or using the debugger? The output XML kind of looks like it has one table per row, but this is not actually the case.

Yeah, I was looking at the XML. After counting the number of tables and rows, I found out the output was right, just that they have a (what looks like to me) weird way of outputting it..

this was my first day writing .NET stuff, so there were a lot of "wtf"s ;)