February 23, 2016

Convert Month Number to Month Name Function in SQL

Select DateName( month , DateAdd( month , 1 , -1 ))

February 10, 2016

Multiplication of the values of two textboxes and displaying result in the third textbox

private void txtPRate_TextChanged(object sender, EventArgs e) { Multiply(); } private void Multiply() { int a, b; bool isAValid = int.TryParse(txtPRate.Text, out a); bool isBValid = int.TryParse(txtProductQuantity.Text, out b); if (isAValid && isBValid) txtPAmount.Text = (a * b).ToString(); else txtPAmount.Text = "Invalid input"; } private void txtProductQuantity_TextChanged(object sender, EventArgs e) { Multiply(); }

February 4, 2016

Assign int type NULL value in SQL

 [EmpMachineId]                           INT        DEFAULT CAST(NULL AS INT)     NULL UNIQUE,

February 3, 2016

There is already an open DataReader associated with this Command

Just add the following in your connection string:
MultipleActiveResultSets=True;