grum
Posts: 42
|
| Posted: 10/12/2007, 5:14 PM |
|
I am getting the following message after I generate a page after upgrading a project to 3.0.2. I am generating a PHP application.
This is the warning message and the code:-
Warning:Record : Event AfterExecuteInsert cannot have actions because datasource would not be generated.
My code after the event is:
//Custom Code @267-CCBCE907
global $CommunicationAdd;
if ($CommunicationAdd->Errors->Count() == 0) {
//End Custom Code
//DLookup @268-4EB3E85C
global $DBTCM;
global $NewContractCommID;
$Page = CCGetParentPage($sender);
$ccs_result = CCDLookUp("LAST_INSERT_ID()", "Contracts_Comm", "", $Page->Connections["TCM"]);
$ccs_result = intval($ccs_result);
$NewContractCommID = $ccs_result;
//End DLookup
//Custom Code @269-CCBCE907
$db = new clsDBTCM;
$Filename = $CommunicationAdd->DocumentUpload->TemporaryFolder . $CommunicationAdd->DocumentUpload->Value;
$Document_Content = addslashes(file_get_contents($Filename));
unlink($Filename);
$CommunicationAdd->DocumentUpload->Value = "";
$Document_MIME = $_FILES["DocumentUpload_File"]["type"];
$Document_Name = $_FILES["DocumentUpload_File"]["name"];
$db->Query("UPDATE Contracts_Comm " .
"SET Document = '" . $Document_Content . "', " .
"Document_MIME = " . CCToSQL($Document_MIME, ccsText) . ", " .
"Document_Name = " . CCToSQL($Document_Name, ccsText) . " " .
"WHERE ContractCommID = " . CCToSQL($NewContractCommID, ccsInteger));
unset($db);
global $Redirect;
global $FileName;
$Redirect = $FileName . "?" . CCAddParam(CCAddParam(CCGetQueryString("QueryString", array("ccsForm", "AddComm", "UpdatedComm", "DeletedComm")), "NewComm", ""), "ContractCommID", $NewContractCommID);
}
//End Custom Code
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 10/14/2007, 6:19 AM |
|
Is your form based on a multi table SQL, therefore in need of custom Insert?
The warning says there will be no Insert for the forms datasource?
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
|