Forums

This topic is locked

Error Trapping in the standard UD insert page

Posted 30 Jan 2002 02:36:53
1
has voted
30 Jan 2002 02:36:53 b w posted:
I want to add to the standard Ultra DEv Insert coding so I can tell the user that the field is contains less than the standard 10 characters for a Government ID and go to another page (without inserting the data to db) and the redirect page can show the errors or incomplete data that needs to be corrected or filled properly.
Anyone know which part of the code to change?
Anyone know of some pointers to error trapping?



Replies

Replied 30 Jan 2002 10:17:41
30 Jan 2002 10:17:41 Viktor Farcic replied:
find part of the code that looks like:
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert") <> "" Then
...


Change it to:
If (CStr(Request("MM_insert") <> "" And (Len(Request.Form("FormFieldName" >= 10)) Then
...

*Replace FormFieldName with name of the field that contains Government ID.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I want to add to the standard Ultra DEv Insert coding so I can tell the user that the field is contains less than the standard 10 characters for a Government ID and go to another page (without inserting the data to db) and the redirect page can show the errors or incomplete data that needs to be corrected or filled properly.
Anyone know which part of the code to change?
Anyone know of some pointers to error trapping?




<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager

Edited by - vfarcic on 30 Jan 2002 10:18:20
Replied 31 Jan 2002 03:04:51
31 Jan 2002 03:04:51 b w replied:
Thanks Victor! It will take me a while to get going but this is valuable information. Much appreciated.

Reply to this topic