日期:2014-05-18 浏览次数:20829 次
…… conn.Open(); SqlCommand comm = new SqlCommand(); comm.CommandText = "Select top 500 voicefile FROM GSMVoiceInfo WHERE (tPhone = '14444440') AND (LEN(VoiceFileName) > 0)"; comm.CommandTimeout = 300; comm.Connection = conn; SqlDataReader dr; dr = comm.ExecuteReader(); int i = 0; while (dr.Read()) { //i++; this.dataGridView1.Rows.Add(new ListViewItem(dr.GetString(dr.GetOrdinal("voicefile ")))); } conn.Close();