hey im in the middle of creating a little program that allows a user to search and if in admin mode can delete and add a new record to the database i have my search part working fine
i have made the query using the dataset.xsd query builder i used the select, from where query after making the query i have gone to my form and called it using Me.peopleTableAdapter.FillByPeople(systemDataSet.people, Me.peopleTextBox.Text, Me.peopleTextBox.Text, Me.ageTextBox.Text, Me.ageTextBox.Text)
my problem is how do i insert into by database using the dataset.xsd query builder and then calling it in the same way rather than doing dimcon as new ole.db connection as i have set my connection string in the settings of my application
i had made the query
(person_Forename, Person_Surname, Admin_Username, Admin_Password)
VALUES (and listed the textboxes used to enter data here)
and then i called it in the same way as i did the select query
but it does not seem to work i dont know where i am going wrong and would really yappriciate if someone could tell me

8 Years
Discussion Span
Last Post by IT21

thanks for the link i have followed what it has said to do and now have the dataadapter manually made with the querys but do you know how i call them?


i have created a dataadapter manually and through the wizrd the select,insert,delete and update commands where built. i now need to know the code to call the commands i am trying to insert data from text boxes on a form into the database this is the code i have

        OleDbDataAdapter1.InsertCommand = New OleDb.OleDbCommand("Insert into Admin(Employee_Forename, Employee_Surname, Admin_Username, Admin_Password) Values (?,?,?,?)", OleDbConnection1)

        OleDbDataAdapter1.InsertCommand().CommandText = ("Insert into Admin(Employee_Forename, Employee_Surname, Admin_Username, Admin_Password) Values (?,?,?,?)")


but im getting an error saying a value isnt being given to one or more of the parameters
could someone please tell me where im going wrong

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.