请大家帮帮忙!
怎么才能把sqlcommand中的sql语句查询出来的结果放到textbox中去 比如这样个例子using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
namespace 查询
{
class Program
{
static void Main(string[] args)
{
SqlConnection connection = new SqlConnection();
connection.ConnectionString = "Data Source=WWW-2568B4977E8\\FREENESS;Initial Catalog=Exercise;Integrated Security=true";
connection.Open();
SqlCommand cmd = new SqlCommand("select * from Friend", connection);
SqlDataReader myReader = cmd.ExecuteReader();
到这边都没问题 接下来是怎么把sqlcommand中查的数据放到textbox中啊
}
}
}