Hello, I want to insert data from a form with textboxes for entry of the information. I have a dataset,bindingsource and table adapter on the form and the text boxes are bound. So far I have managed to do a "manual" insert using the following code
Me
.HospitalTableAdapter.Insert("1", Me.NameTextBox.Text, Me.Address1TextBox.Text, Me.Address2TextBox.Text, Me.Address3TextBox.Text, Me.CountyTextBox.Text, Me.CountryTextBox.Text, Me.TelTextBox.Text, Me.FaxTextBox.Text, Me.EmailTextBox.Text, Me.WebTextBox.Text)When an insert button is clicked, is there an easier way to carry out an insert without having to specify each source textbox Also I have to "hard Code" an ID of "1" for a field which is part of a primary key, is there a way to auto increment the database field
I am using VB express 2005 and SQL server express 2005.
Thanks
Damian

Insert from Form with textbox for details
Frank Szendzielarz
Manan Pancholi
Hiya,
Thanks for the reply I have sorted the increment thing, can you give me an example of the databinding method
KalleKlovn