CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Editable Grid add records with conditions

Print topic Send  topic

Author Message
ekendricks

Posts: 34
Posted: 05/28/2006, 10:47 AM

Using CCS - ASP - Sql 2005
Add/Edit db records using an editable grid with conditions:

I need a grid with a list of 30 to 40 input/edit rows. Each row would have all fields pre-populated except the value field (numeric - quantity)... Each row will contain 3 hidden pre-populated fields. What I would like to do is only insert rows into the database where the quanity field is <> 0 . I know that the row is not considered blank if one of the fields contains a value, and in this case, all but one field will contain a value. What I need to do is make the insert of a row dependent on the value of the field "Value/Quantity", and ignore values in other fields on the same row.

Thanks

Ernest
View profile  Send private message
Edd


Posts: 547
Posted: 05/28/2006, 3:57 PM

Ernest,

Use the custom insert / update facility on your editable grid, then call a stored procedure with the fields. The stored procuedure then can determine what does and does not populate teh database.

Edd
_________________
Accepting and instigating change are life's challenges.

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


Posts: 361
Posted: 05/30/2006, 11:47 PM

Or...

In the Grid.BeforeExecuteInsert, BeforeExecuteUpdate, or BeforeExecuteDelete


if GRID.datasource.QTY.value = 0 then
GRID.command.CommandOperation = 9

What this does is to send an illegal but harmless operation command to the SQL enginge. Because the engine does not find a Code 9 then it exits with no error - and No update.

Hope this helps

Remember - you have to work with the DATASOURCE values


Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
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.