To add code to the button Click event

  1. Double-click the button to open the Code Editor.
  2. In the button1_Click event code block, add the following code:
  3. bdpSelectCommand1.Close();
  • This closes the command to make sure that we will pass the parameter to */
  • the most current bdpSelectCommand.
  1. BdpDataAdapter1.Active := false; /* This clears the data adapter so that we don't maintain old data */
  2. bdpSelectCommand1.Parameters['emp'].Value := textBoxl.

Text;

/* This sets the parameter value to whatever value is in the text field. */

Self.BdpDataAdapterl.Active := true; /* This re-activates the data adapter so the refreshed data appears in the data grid. */

If you have changed the names of any of these items, you need to update these commands to reflect the new names.

3. Save your application.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment