Hi,
I need to fill a string with data from sql server, i am using the following
statement for retrieving the data (example)
public SqlDataReader Inleiding ()
{
strConn="Data Source=W2K3-BASE;uid=test;pwd=test;Initial
Catalog=northwind";
mycn = new SqlConnection(strConn);
SqlCommand myda = new SqlCommand ("Select description FROM Categories
where categoryid = 1 ", mycn);
myda.CommandType = CommandType.Text;
mycn.Open();
SqlDataReader ddsqlReader =
myda.ExecuteReader(CommandBehavior.CloseConnection );
return ddsqlReader;
}
But when I fill the string with the ddsql reader it gives me a true value
and not the value of the record! How can I solve this?
Filling the string like this:
string test = Testing().ToString();
--
thanks,
Remco Ploeg