This topic is locked

Required Fields Problem

4/5/2005 10:53:15 AM
ASPRunnerPro General questions
author

I have the following problem : I defined a required field on the Edit screen in AspRunner but, if I put the field empty, I have no error message (I have only an error when it tried to update the field in my database because this field is defined as mandatory).

Sergey Kornilov admin 4/6/2005

Hi,
it looks like the javascript error is happened on this page. If you see an yellow exclamation sign in the bottom left corner of the status bar click on it and read about this error.
Usually it is happens due to bad database field names.
If it doesn't help please zip and send to support@xlinesoft.com all files from ASPRunnerPro output folder with subfolders along with project file and your sample database. I'll find what's wrong running it on my test box.

C
chantal 4/12/2005

Hi
It looks like an Oracle error and not a javascript one :
Error number

-2147467259

Error description

Oracle][ODBC][Ora]ORA-01407: cannot update ("SLAPS"."DI_COUNTRY"."COUNTRY_DE") to NULL ORA-06512: at "SLAPS.DI_COUNTRY_UPDATE", line 6 ORA-06512: at line 1

URL

/testasprunner/DI_COUNTRY_edit.asp

SQL query

{call DI_COUNTRY_Update(?, ?, ?)}
Send you the database seems me complicated and I have resolved the problem modifying directly the Edit.asp source. I can try to explain you the case I have :
I have a table (defined in an Oracle database) containing a country code(COUNTRY_CD) and a country description(COUNTRY_DE). In AspRunner, on the Formatting screen, for the Edit page, only the description is selected and it is defined as a required field.

In the Edit screen, if I put the description to blank, I have no the check which says "The Following fields are Required : COUNTRY_DE" so there is an error when it tries to update my database table because the description is defined as a mandatory field.
If I replace, in the Edit.asp, the line :

<body bgcolor=white onLoad="define('COUNTRY_CD', 'IsRequired', '<%=Label("COUNTRY_CD")%>');define('COUNTRY_DE', 'IsRequired', '<%=Label("COUNTRY_DE")%>');">

by the line :

<body bgcolor=white onLoad="define('COUNTRY_DE', 'IsRequired', '<%=Label("COUNTRY_DE")%>');">

it's ok!
Regards