How to catch DB errors?

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

How to catch DB errors?

Postby patrick » Mon Mar 08, 2004 6:14 pm

Hello,

does anyone know how I can prevent database errors? Let's say you have a column specified as "not null" and the user leaves the field empty, an error is thrown. This error is not something every user understands. So I would like to catch that error and present something the user understands.

I have played with error capture in combination with onRecordSave, but no success. Does anyone have a solution for this?

Thanks
Patrick
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby jcompagner » Tue Mar 09, 2004 8:34 pm

we are looking at better error reporting our self.
(with error codes ect)
Databases errors (codes) are not really in a standard format..
So we have to first do that ourselfs.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Wed Mar 10, 2004 11:17 am

if we could grab the error that servoy throws ("Java ... SQL Server message ... ") we'd be able to interpret what went wrong ourselfes. But I see no way to get that error...
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby jcompagner » Thu Mar 11, 2004 10:10 am

that is for every database different.. and there are a lot of different error messages that you could get...
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Thu Mar 11, 2004 12:05 pm

but is it possible to "deliver" whatever error to us?
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 11 guests