directxBOB
asked on
SQL Query & C# Objects
I Have:
command.Connection = connection;
command.CommandText = "select * from Cards where CardID_PK = '" + cardId + "'";
command.ExecuteNonQuery();
Which basically grabs the card with the matching id.
My question is rather simple how would I get this data back as a collection / dataset so I can manipulate it?
More importantly say I am getting back multiple cards or multiple accounts how do I then handle these? I am most likely just missing a container step for handling?
command.Connection = connection;
command.CommandText = "select * from Cards where CardID_PK = '" + cardId + "'";
command.ExecuteNonQuery();
Which basically grabs the card with the matching id.
My question is rather simple how would I get this data back as a collection / dataset so I can manipulate it?
More importantly say I am getting back multiple cards or multiple accounts how do I then handle these? I am most likely just missing a container step for handling?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And Bob's way works very wel, particularly if you have no interest in writing anything back to the table.