Expand my Community achievements bar.

Error while doing an INSERT or an UPDATE to the DB(MS Access)

Avatar

Former Community Member
I get the following error while inserting or updating the database (MS Access in my case). However, the record does get inserted or updated. Please advice. I just want to get rid of the error to utilize my form.



Error :ado2xfa operation failed. It, cannot be found in the collection corressponding to the requested name or ordinal



Thanks.
6 Replies

Avatar

Former Community Member
You get that error, because you've changed a property that is supposed to be a select statement to an insert or update statement. So, it runs the SQL expecting a record set to be returned, when there isn't one (since it's not a select statement) it throws there error.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Cris,



Is possible fix it?

How?



I don't want create a invisible fields that link with the database .



Thanks a lot.



----------------------------------

Hosting Association

The low cost quality hosting

http://www.hostingassociation.biz

----------------------------------

Avatar

Former Community Member
If you mean fix it, by continuing to use an insert statement and not have the error appear, then no. The best you can do is catch the error and ignore it and hope this continues to work in the future.



The way not to get the error would be to use the addNew() and update() methods of the data connection, where the values in the bound fields would be updated in the DB.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Actually, I use try and catch and I ignore the error, but if the insert has failed I can't control.

Do you know the procedure for control it?



Thanks a lot for your help cris

----------------------------------

Hosting Association

The low cost quality hosting

http://www.hostingassociation.biz

----------------------------------

Avatar

Former Community Member
Hi Chris,



I am using all the control as described by Stefan in his blog

http://blogs.adobe.com/formbuilder/2006/09/connecting_form_to_database.html.

But the addnew() fails. I mean after I press the button, nothing happens - no errors and the insert does not work. Do you have any examples for the same.



Thanks for your help Chris.