string connectionString = "Data Source=xyz;Initial Catalog=abc;User ID=sa; Password=123; Integrated Security=true "; SqlConnection sqlConnection = new SqlConnection(connectionString); try { sqlConnection.Open(); SqlCommand sqlCommand = new SqlCommand("SELECT COUNT(*) FROM tblProduct"); sqlCommand.Connection = sqlConnection; int RecordCount = Convert.ToInt32(sqlCommand.ExecuteScalar()); } catch (Exception ex) { MessageBox.Show( ex.Message.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)