CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Nulls is Database

Print topic Send  topic

Author Message
DrivenTooFar

Posts: 10
Posted: 03/02/2007, 6:44 AM

I have a page created with an editable grid. The page allows for 4 empty rows that can be filled out. The problem I am having is that it inserts nulls into the database if nothing was entered. What I am trying to do is not have anything inserted at all if there was nothing entered.

Basically if I fill out only 2 out of the 4 rows then I want only 2 rows put into the database, not 2 rows with info and 2 rows of nulls. Is there a quick and easy way to do this in CS or is it something I will have to write. Thank you for your help.
View profile  Send private message
matheus

Posts: 386
Posted: 03/02/2007, 6:50 AM

Have other field (hidden) in same line?

Editable Grid calculate empty line if didn't have any field filled.

So, if had some hidden (with session value, for example), fill this hidden value in OnValidate from field.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
DrivenTooFar

Posts: 10
Posted: 03/02/2007, 12:51 PM

So basically I will add hidden fields for each field that will hold the original data and if there is something there it will insert? Other wise it will not do anything and not insert nulls? Just making sure I understand correctly.
View profile  Send private message
Edd


Posts: 547
Posted: 03/05/2007, 5:32 PM

DrivenTooFar,

I am guessing but one of the problems most people have with editable grids is that they put default values into a line, example a key field from the primary table. If you do this CCS thinks you have a something in this line and wants to insert it.

To get around remove the default values, then create a custom insert (type table) for the editable grid. Then go through each value and set the source of the postings, i.e. control for fields on the form and for your key field from the primary table you might select that this value comes from the URL.

Cheers Ed

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message

Add new topic Subscribe to topic   


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.