multiple step operation generated errors!!! HELP ME
i have never seen this error before. Its a run time error. The source code below generates it. Please tell me how to fix it. Thanks in advance.
VB Code:
Private Sub Command2_Click()
Adoproducts.Recordset.Fields("ProductID") = tbpid.Text
Adoproducts.Recordset.Fields("ProductName") = tbpn.Text
Adoproducts.Recordset.Fields("Date") = tbdate.Text
Adoproducts.Recordset.Fields("US Rate") = tbrate.Text
Adoproducts.Recordset.Fields("Scaled Weight") = tbweight.Text
Adoproducts.Recordset.Fields("Yeild") = tbyeild.Text
Adoproducts.Recordset.Fields("IngredientList") = txtlist.Text
Adoproducts.Recordset.Fields("TOTAL") = txttotal.Text
End Sub
Re: multiple step operation generated errors!!! HELP ME
VB Code:
Private Sub Command2_Click()
Adoproducts.Recordset.AddNew()
Adoproducts.Recordset.Fields("ProductID") = tbpid.Text
Adoproducts.Recordset.Fields("ProductName") = tbpn.Text
Adoproducts.Recordset.Fields("Date") = tbdate.Text
Adoproducts.Recordset.Fields("US Rate") = tbrate.Text
Adoproducts.Recordset.Fields("Scaled Weight") = tbweight.Text
Adoproducts.Recordset.Fields("Yeild") = tbyeild.Text
Adoproducts.Recordset.Fields("IngredientList") = txtlist.Text
Adoproducts.Recordset.Fields("TOTAL") = txttotal.Text
Adoproducts.Recordset.update()
End Sub
Insted you can you
Connection.Execute "INSERT INTO....
Re: multiple step operation generated errors!!! HELP ME
your question is somewhat not understandable and is not providing full details. please also tell what run-time error it generates and which line does it highlights.
Harsh
Re: multiple step operation generated errors!!! HELP ME
Even I am not able to understand his multiple step, lol, Today i realize that every vb6 sub or function is a Multiple Step Procedure, lol
Re: multiple step operation generated errors!!! HELP ME
I've found that "multiple step" error is quite often generated as a result of a type mismatch.
Re: multiple step operation generated errors!!! HELP ME
Without knowing what exactly the error is, much less what line it highlights... I can deduce approximately 30 things minimum that could be wrong...
What we need is (as Harsh Gupta already stated) is the error message and the line it highlights...
Re: multiple step operation generated errors!!! HELP ME
Al42 is right, i also encountered that error before.. another cause is when the lenght of data you're saving to the db exceeds the lenght of the field..
anyway, i suggest you follow the suggestion of Vishalgiri, use the INSERT stuff....
this is a manifest how CRUEL bound controls are... :D
Re: multiple step operation generated errors!!! HELP ME
I am completely agree with eimroda, While working with Access Databases (.mdb) the length of the field if by default 50, so every time i designs a Access Database I need to make it 255.
In that case even INSERT stuff will produce error.
Re: multiple step operation generated errors!!! HELP ME
I see several possible problems right off
VB Code:
Adoproducts.Recordset.Fields("Date") = tbdate.Text
Adoproducts.Recordset.Fields("US Rate") = tbrate.Text
How are these fields (and the others) defined in your database? Multiple Step Error just means that the engine would need to do multiple operations to get the data to match correctly. If these fields are the wrong type this type of error will happen.
Or if you are attempting to insert NULLS into the database.