Saving a searching for Data in an SQL Server?

Soldato
Joined
30 Jul 2004
Posts
10,572
Location
East Sussex, UK
Howzit Guys,

I'm busy building an application that has to hold customer infomation. Now I am using VB 2005 to desgin the and build the program. I have done the GUI on the Form.vb and have added a SQL DataBase, then I made some tables with colums and set all my textBox DataBindging properties to the matching coloums in the database.

Now, what I would like to do is add a Search, Save and Add function. I have placed the Button controls on the form, but, obviously they don't have any code to control that function.

Could anyone tell me what or how to add code to those buttons to achive what I am trying to do?

Any help would be greatly appericated! :)

Robbie.
 
No, I want to add data to the data base, through the application. I also wanted to be able to sea5rch the data base for customers which i have sorted now, but it's just the add function I cant get right. :(
 
I tried the MSDN site, no help, they gave me this code:

me.validate ()

me.YouTableBindingSource.EndEdit () ;

me.YourTableAdapter.update(me.yourDataset.YourTable

How do I validate it then, and do I use the code you provided in a button_click_event?

Thanks a lot for the help, I will try it tonight.

Also, if you know, how do I have the data to the data base then, so when I re open the program it will be still be in the DB.

If I have a lot of text boxes, do I have to enter them all into that code?
 
Back
Top Bottom