I get one column using ExecuteScalar:
cmd.commandtext = "select rodeuser from customer_db_map";
string rodecustomer = cmd.executescalar;
But I need to get more than one column, for example:
cmd.commandtext = "select rodeuser,username,password from customer_db_map";
I need every column in a row:
string rodecustomer = cmd.ExecuteScalar();
string username= cmd.ExecuteScalar();
string password = cmd.ExecuteScalar();
But this is unreal. How is this achieved?
source
share