SqlConnection oConn = new SqlConnection("Data Source = roger\\sqlexpress;Initial Catalog = test; Integrated security=SSPI"); SqlCommand oCmd = new SqlCommand(); SqlDataReader Rdr; oConn.Open(); oCmd.Connection = oConn; oCmd.CommandType = CommandType.Text; oCmd.CommandText = "select * from person"; Rdr = oCmd.ExecuteReader(); while(Rdr.Read()) MessageBox.Show(Rdr["pin"].ToString()); oConn.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)