CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 USING THE SQL PARAMETER WINDOW

Print topic Send  topic

Author Message
FRAMIREZS

Posts: 6
Posted: 03/29/2004, 7:48 AM

I need modify a SQL parameter in Before Execute Update Event depending a control value.
I don't know how to define the parameter in the SQL Parametre Window.
I don't know how to assign the parameter value in the event.
I don't find the "USING THE SQL PARAMETER WINDOW" in the online help.

Any idea?
View profile  Send private message
peterr


Posts: 5971
Posted: 03/29/2004, 11:52 AM

"Using the SQL Parameter Window" is in both offline and online Help. For example at http://docs.codecharge.com/studio/html/UserGuide/Forms/FormDataSource.html

However, you may need to choose either to use the Event or the SQL parameter, but probably not both. If you use the SQL parameter then it will work automatically and an Event is not needed.

I also believe that the solution may depend on the case, therefore please provide full details.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
FRAMIREZS

Posts: 6
Posted: 03/29/2004, 11:47 PM

Thanks for the reply.
More exactly, I have a editable grid with two editable fields "NUMRECEIVE" and "DEPARTMENT" and a label field "DATERECEIVE" that only must be updated if the first field is greater than zero
My custom update is
UPDATE pedidosd SET RECIBIDOS=RECIBIDOS+{NUMRECEIVE}, DEPARTMENT='{DEPARTMENT}' , DATERECEIVE={DATERECEIVE}
WHERE NUMERO={NUMERO} AND ITEM={ITEM}

DATERECEIVE must be Now if NUMRECEIVE>0 and DATERECEIVE=label field (the current value) if NUMRECEIVE=0
How Do I modify DATERECEIVE parameter?
View profile  Send private message
sebastian

Posts: 15
Posted: 03/30/2004, 10:28 PM

I suggest you create additional hidden control and bind it to the same database column as DATERECEIVE is bound to.
Then there won't be the need to use Custom Update.

Modyfing control's values depends on their Data Type. For text and hidden controls set to Text data type, you would usually use:
$formname->controlname->SetValue($newvalue);
If the type is Date, you need to pass a UNIX timestamp as the parameter, e.g.:
$formname->controlname->SetValue(time());
will set the control's value to the current time.

Sebastian
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.

Web Database

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.