Avoid "Unspecified Errors" by Replacing Byte with Int

Tips submitted by ASPMaker users

Avoid "Unspecified Errors" by Replacing Byte with Int

Postby xgis » Thu Mar 07, 2013 10:16 am

The following error may be received if you are trying to Add or Edit data and you are using Byte fields in MSAccess;

"Microsoft OLEDB Persistence Provider error '80004005'
Unspecified error.
/aspfn10.asp, line xxxx"

One way to resolve this error is to replace table fields using Byte number type with Int. This solution may also be relevant for other database types.

The procedure after you change the field number type;
Refresh your schema
You will inevitably need to reset the settings for affected fields that would have reverted to a textbox control after refresh and update, eg reselect radio button to get your Yes/No values back.

In the event you are planning to migrate to SQL it is best to avoid the Yes/No field type which converts to True values to 255. An easier solution is to use Int and simply set 0 = No and 1 = Yes.
This also makes it easier for Query or View development. If you are using your application with hardcoded values then you can also add extra values like 2 = Maybe
xgis
 
Posts: 87
Joined: Thu Jan 17, 2013 10:40 pm

Return to User Submitted Tips (ASPMaker)