How to execute Stored Procedure in C#
Executing Stored Procedure in C# SQLCommand Command = new SqlCommand(“StoredProcedureName”, Connection); Command.CommandType = CommandType.StoredProcedure; Command.Parameters.Add(new...
View ArticleHow to bind Combobox to a table field?
Binding ComboBox to a table using Stored Procedure SqlDataAdapter da = new SqlDataAdapter(“StoredProcedureName”,Connection); da.SelectCommand.CommandType = CommandType.StoredProcedure;...
View ArticleCustomizing TextBox
Allowing Only numbers in TextBox Insert this code in KeyPress event of textBox private void txtYear_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar) &&...
View ArticleHow to pass tablename as parameter to Stored Procedures
Passing Tablename create procedure SAll (@tablename varchar(25)) as EXEC (‘select * from ‘ + @tablename) udhaya PiSquare Soft Solns
View ArticleHow to make TextBox accept only Deecimal Values?
How to make textbox to allow decimal values in textbox in c#.net windows forms. private void txtRate_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar) &&...
View ArticleLogin Failed for user ‘sa’.Reason:Not associated with a trusted SQL connection
How to connect to a remote SQL database using c# windows application? 1.First Ensure that Mixed mode authentication is enabled on your SQL Server. To Enable Mixed Mode authentication Open ENTERPISE...
View ArticleHow to rename Columnname in a table?
Renaming fieldname in a table ALTER TABLE Tablename RENAME COLUMN ColumnName to NewColName ALTER TABLE Employee RENAME COLUMN Employee_number to Emp_id Udhaya Pi Square Simsys
View ArticleHow to add controls to a form at runtime?
Dynamic creation of controls Label lbl = new Label(); this.Controls.Add(lbl); lbl.Name = lblName; lbl.Text = “Name”; Udhaya Pisquare Simsys
View ArticleHow to change the location of a control at runtime in c#?
Changing the position of control at runtime Label1.Location = new Point(X position,Y position); Udhaya Pisquare
View ArticleHow to add Yes and No buttons to Message Box?
DialogResult button = MessageBox.Show(“Are you sure want to exit”, “Exit”, MessageBoxButtons.YesNo); if (button == DialogResult.Yes) { Application.Exit() } Udhaya Pisquare
View Article
More Pages to Explore .....