Cleaner error message DBPro - Forum

Forum Navigation
You need to log in to create posts and topics.

Cleaner error message DBPro

In DBpro, I created an index which is not primary but is to be unique.

When a duplicate value is put in the field, I get a rather long (maybe confusing) error message.

I would like to keep it more simple. How would I do this?

Message something like 'Duplicate value not allowed! or value already used.'

Hola existe el comando dbpShowErrors y la variable predefinida [dbpError].

dbpShowErrors "No"
SetVar "[db.table.codebar]" "987654321"
dbpSaveEdits "db" "table"
If "[dbpError]" ">" ""
AlertBox "Error" "Duplicate value not allowed! "
endif
dbpShowErrors "Yes"

 

Thanks so much for the suggestion. Only one question: How do I use or define

SetVar "[db.table.codebar]" "987654321"  ?

No lo necesitas, bórralo. Se supone que tu tienes Text Entry donde ingresas los datos.