CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 How to reference a specific field in editable grid

Print topic Send  topic

Author Message
EF
Posted: 03/18/2003, 11:20 PM

In an Editable Grid that contains - for example - 3 columns(fields) and 3 rows(record), the first and second fields are mandatory in the database. If the user submits the form in Update or Insert with data entered in these 2 fields everything is ok. The problem is when leaving any of it without data which will violate database integrity. I recieve the following error:

--------------------------------------------------------------------
Error Type:
Microsoft VBScript runtime (0x800A0009)
Subscript out of range: 'I'
/RRD_INTRANET/EIR/Status.asp, line 473


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)

Page:
POST 684 bytes to /RRD_INTRANET/EIR/Status.asp

POST Data:
FormState=2%3B1%3BACT_REC_SERIAL%3BACT_SEQ%3BUPDATE_DATE%3B5%3B1%3B3%2F1%2F2003%3B5%3B1%3B4%2F2%2F2003&UPDATE_DATE_1=01%2F03%2F2003&COMMENTS_1=&SUGGESTED_TARGET_1=&UPDATE_DATE_2=02%2F04%2F2003&COMMENT . . .
-------------------------------------------------------------------

Its a classic VALIDATION problem, My question is HOW TO FORCE THE USER NOT TO LEAVE THESE 2 FILEDS EMPTY, I tried everything i know, nothing is working by adjusting the IDE properties like 'required ' or 'validation rule'.

I tried to do it by code, but i think the fact that there are multiple occurences of each field is causing the problem.

Your help please,

I'm using the last beta of ccs with asp.
Edd
Posted: 03/19/2003, 1:55 PM

Firstly I have to ask the basic question - did you mark the fields as 'Required' in their properties?

Note: Do Not use the Default values property if you have additional rows as this populates unused rows and tries to update them as well. Use the before Insert and Before Update events to populate these fields.

The other way is to validate it yourself on the validate event OF EACH FIELD (not the record) as you would do normally.

If you wish to validate the entire record - look at the generated code for the main page where it does it's validation and copy that section into your code - it is reasonably explanatory.

To add a twist to the tail if you add errors to the Record (not the field) of an updateable grid in the Beta release then the error will not appear (known mandatory enhancement/bug).


Hope this helps.

Edd

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.