Data Tier Application Development with VB.NET Part 2 - Using parameterized queries Page 5.

by Steve Ochani http://www.steveo.us

 

You will now need to modify your data tier, add another function such as getdataset2 which takes in a string parameter which is used to call the FillBy method in the tableadapter.

Now you will need to code the search form. It is very similar to the previous form except it passes a parameter to the getdataset method. This parameter being the lastname which is from the textbox. You will also have to make it that the bindings only occur once, this can be achieved by using a boolean variable. Since the entire code for this form is not visible I've included a link at the end of this tutorial for it. Remember to set this form as your startup form by going to Project menu and changing your project properties.

Now you can test your program.

I hope you found this tutorial helpful.

Click here for the source code for the frmSearch form.

-Steve O.

 

EOF