Source language: Translate to:

Controlling messages

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Controlling messages

Postby carlos torres » Wed Jun 04, 2008 4:58 pm

Hi everybody

I'm using DbPro and trying to produce some errors like duplicate record key and so on... The error messages is to long.

How can I re-design/rewrite those error messages?

TIA

regards
carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Postby Neosoft Support » Thu Jun 05, 2008 9:59 am

The majority of the error messages are generated by the database engine (Access, mySQL, etc.) or driver not DBpro, which simply passes the message along to NeoBook. Unfortunately, as far as I know there is no comprehensive list of error messages available, which makes translation extremely difficult. What I would suggest is that you translate only the most common error messages and ignore the ones that occur only rarely. For example:

First, turn off error messages:

Code: Select all
dbfShowErrors "False"


Then after important dbp commands do something like this:

Code: Select all
dbp...
If "[dbpError]" "=" "duplicate record key"
  .translate
  AlertBox "Error" "Llave de registro duplicado."
Else
  If "[dbpError]" ">" ""
    .display as is
    AlertBox "Error" "[dbpError]"
  EndIf
EndIf
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Wrangler » Fri Jun 06, 2008 7:55 am

Here is a list of Access error messages. May help a little:

http://download-west.oracle.com/docs/cd ... 7262/a.htm
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Neosoft Support » Fri Jun 06, 2008 9:36 am

Wow! That's a long list. Thanks for posting the link.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Gaev » Fri Jun 06, 2008 9:54 am

Wow! That's a long list. Thanks for posting the link.

Wonder if NeoBookDBPro is returned the error numbers associated with each error description ... might be a good idea to build a "Database Table of Access Errors" ... and a generic routine that "returns the description for a given error number" ... then developers can include the appropriate "language" Table in their applications ... I am pretty sure MicroSoft has a similar list for the other major languages ... so may not need to do a manual (or google/yahoo) translation.

Spoiler !!! ... a number of error descriptions are not static e.g. ...

3006 Database <name> is exclusively locked

... where <name> represents a placeholder for a value that is given when the error message is displayed ... so the translator is not going to be a simple piece of code.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

About Error Messages

Postby carlos torres » Fri Jun 06, 2008 3:21 pm

Thanks NB Support for your suggestion
Thanks Wrangler for the link

I agree with you about using the common errors.

regards

carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia


Return to NeoBookDBPro

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron