EMG
|
| Posted: 08/07/2002, 7:02 AM |
|
Using the BeforeInsert() event on a record form, how do you cancel the insert action? What property do change? I am able to add/display errors but the insert still occurs.
Thanks!
|
|
|
 |
Ron
|
| Posted: 08/07/2002, 7:27 AM |
|
Hello,
do you work with CC or CCS and what is your programmin language/
|
|
|
 |
EMG
|
| Posted: 08/07/2002, 7:32 AM |
|
CCS 1.06
|
|
|
 |
EMG
|
| Posted: 08/07/2002, 7:32 AM |
|
CCS & PHP
|
|
|
 |
EMG
|
| Posted: 08/07/2002, 11:55 AM |
|
Ron, looks like you were ready to give an answer...you still there?
|
|
|
 |
Ron
|
| Posted: 08/08/2002, 3:37 AM |
|
Hello,
first of all upgrade to latest CCS version that is CCS1.0.7.
"
To install the update download and run the following file: http://www.codecharge.com/download/files/CCStudio1_0.exe
Release Notes are available at http://support.codecharge.com/updates.asp
Please note that this release resets the Trial period to 20 days.
"
To forbid Insert (or other operation) put the following code into BeforeInsert (or other corresponding) event:
global $form_name;
$form_name->InsertAllowed = false;
for update use:
UpdateAllowed
For delete use
DeleteAllowed
|
|
|
 |
EMG
|
| Posted: 08/13/2002, 6:41 AM |
|
I do not want to hide the insert button (which the last posting will do), but rather cancel the execution of the sql at runtime based on various conditions.
|
|
|
 |
EMG
|
| Posted: 08/13/2002, 8:28 AM |
|
Nicole, CCS, whomever may know:
Could you give me a hint on this one? What is the property to prevent sql execution on a record form using the before insert event?
|
|
|
 |
max
|
| Posted: 08/14/2002, 12:43 AM |
|
in this cases, I use custom insert (or update/delete ...) type "procedure" (I'm working with Oracle) and inside the stored procedure I add all my logic and control.
max
|
|
|
 |
Nicole
|
| Posted: 08/14/2002, 4:42 AM |
|
EMG,
the solution proposed by Ron works. Put the code into form Before Insert event. You'll see Insert button, but the operation won't be performed.
|
|
|
 |