Hello guys, I am making a program in VB as frontend and Sql2000 as Backend. Now i have a form to add new employee in the database. There is a button on the form as Add. After filling all the fields in the form when the user clicks on Add it should be added in the Employee table in the database. This is the code that i am using to add the record: Private Sub add_Click() emp.Recordset.AddNew Array("emp_no", "f_name", "l_name", "designation", "emp_image"), Array(Val(Text1), Text2, Text3, Combo1.Text, strpath) End Sub Code (markup): Here 'emp' is name of the ADODC component. It is already connected to the database and to the employee table. Now when i run it and after entering records this is the error i get: Run-time error '-2147217887 (80040e21)': Multiple-step operations generated errors. Check each status value. Code (markup): I am stuck up and cant go ahead with my project. Please i request you to help me soon. Thanking you.
Please provide more info. This error could happen because of incorrect values. What's Text2, Text3? If it's empty could be a reason for an error. In any case, please provide full script.
Also, is the recordset open? Maybe you could use INSERT INTO query instead? I know in ASP you can have something like this DatabaseObject.Execute "INSERT INTO table_name SET (field1, field2) values (Text1, Text2)"