What type is the field set to? I tested with a field with the field type set as number and then as text and neither produced an error.
Are you perhaps inserting into a container field?
You might get faster results if you insert into a global field and use a regular scripted find such as:
Enter find mode 
Set field [YourTable::Yourbarcodefield ; YourTable::GlobalBarCodeField ]
Set Error Capture [on]