本文整理汇总了C++中SQLStatement::AddColumnInt64方法的典型用法代码示例。如果您正苦于以下问题:C++ SQLStatement::AddColumnInt64方法的具体用法?C++ SQLStatement::AddColumnInt64怎么用?C++ SQLStatement::AddColumnInt64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQLStatement
的用法示例。
在下文中一共展示了SQLStatement::AddColumnInt64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
IPAddressSQLHelper::AppendStatement(SQLStatement &statement, const IPAddress &address, const AnsiString &address1Column, const AnsiString &address2Column) const
{
statement.AddColumnInt64(address1Column, address.GetAddress1());
if (address.GetType() == IPAddress::IPV6)
statement.AddColumnInt64(address2Column, address.GetAddress2());
else
statement.AddColumnNULL(address2Column);
}
示例2:
bool
PersistentIMAPFolder::SaveObject(std::shared_ptr<IMAPFolder> pFolder)
{
bool bNewObject = true;
if (pFolder->GetID())
bNewObject = false;
SQLStatement oStatement;
oStatement.SetTable("hm_imapfolders");
if (bNewObject)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("folderid");
DateTime creationTime = pFolder->GetCreationTime();
if (pFolder->GetCreationTime().GetStatus() == DateTime::invalid)
pFolder->SetCreationTime(DateTime::GetCurrentTime());
// This column is always updated by GetUniqueMessageID below
// but we still need to create it.
oStatement.AddColumn("foldercurrentuid", pFolder->GetCurrentUID());
oStatement.AddColumnDate("foldercreationtime", pFolder->GetCreationTime());
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("folderid = %I64d"), pFolder->GetID());
oStatement.SetWhereClause(sWhere);
}
oStatement.AddColumnInt64("folderaccountid", pFolder->GetAccountID());
oStatement.AddColumnInt64("folderparentid", pFolder->GetParentFolderID());
oStatement.AddColumn("foldername", pFolder->GetFolderName());
oStatement.AddColumn("folderissubscribed", pFolder->GetIsSubscribed() ? 1 : 0);
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pFolder->SetID((int) iDBID);
return true;
}
示例3:
bool
PersistentRouteAddress::SaveObject(shared_ptr<RouteAddress> pRA)
{
SQLStatement oStatement;
oStatement.AddColumnInt64("routeaddressrouteid", pRA->GetRouteID());
oStatement.AddColumn("routeaddressaddress", pRA->GetAddress());
oStatement.SetTable("hm_routeaddresses");
if (pRA->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("routeaddressid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("routeaddressid = %I64d"), pRA->GetID());
oStatement.SetWhereClause(sWhere);
}
bool bNewObject = pRA->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pRA->SetID((int) iDBID);
return bRetVal;
}
示例4:
bool
PersistentFetchAccountUID::SaveObject(shared_ptr<FetchAccountUID> pUID, String &result)
{
SQLStatement oStatement;
oStatement.SetTable("hm_fetchaccounts_uids");
oStatement.AddColumnInt64("uidfaid", pUID->GetAccountID());
oStatement.AddColumn("uidvalue", pUID->GetUID());
oStatement.AddColumnDate("uidtime", pUID->GetCreationDate());
if (pUID->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("uidid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
oStatement.SetWhereClause(Formatter::Format("uidid = {0}", pUID->GetID()));
}
bool bNewObject = pUID->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pUID->SetID((int) iDBID);
return bRetVal;
}
示例5: if
bool
PersistentTCPIPPort::SaveObject(shared_ptr<TCPIPPort> pObject)
{
SQLStatement oStatement;
oStatement.SetTable("hm_tcpipports");
if (pObject->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("portid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("portid = %I64d"), pObject->GetID());
oStatement.SetWhereClause(sWhere);
}
__int64 iAddress = 0;
IPAddressSQLHelper helper;
oStatement.AddColumn("portprotocol", pObject->GetProtocol());
oStatement.AddColumn("portnumber", pObject->GetPortNumber());
oStatement.AddColumnInt64("portsslcertificateid", pObject->GetSSLCertificateID());
helper.AppendStatement(oStatement, pObject->GetAddress(), "portaddress1", "portaddress2");
//JDR: Added to store the the UseSTARTLS setting.
if (pObject->GetUseSSL() == true)
{
oStatement.AddColumn("portusessl", 1);
}
else if ( pObject->GetUseSTARTTLS() == true)
{
oStatement.AddColumn("portusessl", 2);
}
else
{
oStatement.AddColumn("portusessl", 0);
}
//JDR: end edit
bool bNewObject = pObject->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pObject->SetID((int) iDBID);
return true;
}
示例6:
bool
PersistentTCPIPPort::SaveObject(std::shared_ptr<TCPIPPort> pObject, String &errorMessage, PersistenceMode mode)
{
if (mode == PersistenceModeNormal)
{
if (pObject->GetSSLCertificateID() == 0 &&
(pObject->GetConnectionSecurity() == CSSSL || pObject->GetConnectionSecurity() == CSSTARTTLSOptional || pObject->GetConnectionSecurity() == CSSTARTTLSRequired))
{
errorMessage = "Certificate must be specified.";
return false;
}
}
SQLStatement oStatement;
oStatement.SetTable("hm_tcpipports");
if (pObject->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("portid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("portid = %I64d"), pObject->GetID());
oStatement.SetWhereClause(sWhere);
}
__int64 iAddress = 0;
IPAddressSQLHelper helper;
oStatement.AddColumn("portprotocol", pObject->GetProtocol());
oStatement.AddColumn("portnumber", pObject->GetPortNumber());
oStatement.AddColumnInt64("portsslcertificateid", pObject->GetSSLCertificateID());
helper.AppendStatement(oStatement, pObject->GetAddress(), "portaddress1", "portaddress2");
oStatement.AddColumn("portconnectionsecurity", pObject->GetConnectionSecurity());
bool bNewObject = pObject->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pObject->SetID((int) iDBID);
return true;
}
示例7:
bool
PersistentGroupMember::SaveObject(shared_ptr<GroupMember> pObject)
{
SQLStatement oStatement;
oStatement.AddColumnInt64("membergroupid", pObject->GetGroupID());
oStatement.AddColumnInt64("memberaccountid", pObject->GetAccountID());
oStatement.SetTable("hm_group_members");
if (pObject->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("memberid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("memberid = %I64d"), pObject->GetID());
oStatement.SetWhereClause(sWhere);
}
bool bNewObject = pObject->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pObject->SetID((long) iDBID);
Cache<Group, PersistentGroup>::Instance()->RemoveObject(pObject->GetGroupID());
return bRetVal;
}
示例8:
bool
PersistentFetchAccount::SaveObject(shared_ptr<FetchAccount> pFA)
{
SQLStatement oStatement;
oStatement.SetTable("hm_fetchaccounts");
bool bNewObject = pFA->GetID() == 0;
oStatement.AddColumnInt64("faaccountid", pFA->GetAccountID());
oStatement.AddColumn("faactive", pFA->GetActive() ? 1 : 0);
oStatement.AddColumn("faaccountname", pFA->GetName());
oStatement.AddColumn("faserveraddress", pFA->GetServerAddress());
oStatement.AddColumn("faserverport", pFA->GetPort());
oStatement.AddColumn("faservertype", pFA->GetServerType());
oStatement.AddColumn("fausername", pFA->GetUsername());
oStatement.AddColumn("fapassword", Crypt::Instance()->EnCrypt(pFA->GetPassword(), Crypt::ETBlowFish));
oStatement.AddColumn("faminutes", pFA->GetMinutesBetweenTry());
oStatement.AddColumn("fadaystokeep", pFA->GetDaysToKeep());
oStatement.AddColumn("fanexttry", Time::GetCurrentDateTime());
oStatement.AddColumn("faprocessmimerecipients", pFA->GetProcessMIMERecipients());
oStatement.AddColumn("faprocessmimedate", pFA->GetProcessMIMEDate());
oStatement.AddColumn("fausessl", pFA->GetUseSSL());
oStatement.AddColumn("fauseantispam", pFA->GetUseAntiSpam());
oStatement.AddColumn("fauseantivirus", pFA->GetUseAntiVirus());
oStatement.AddColumn("faenablerouterecipients", pFA->GetEnableRouteRecipients());
if (bNewObject)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("faid");
oStatement.AddColumn("falocked", 0);
}
else
{
String sWhere;
sWhere.Format(_T("faid = %I64d"), pFA->GetID());
oStatement.SetStatementType(SQLStatement::STUpdate);
oStatement.SetWhereClause(sWhere);
}
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pFA->SetID((int) iDBID);
return bRetVal;
}
示例9:
bool
PersistentDistributionList::SaveObject(std::shared_ptr<DistributionList> pDistList, String &sErrorMessage, PersistenceMode mode)
{
if (!PreSaveLimitationsCheck::CheckLimitations(mode, pDistList, sErrorMessage))
return false;
SQLStatement oStatement;
oStatement.SetTable("hm_distributionlists");
oStatement.AddColumnInt64("distributionlistdomainid", pDistList->GetDomainID());
oStatement.AddColumn("distributionlistenabled", pDistList->GetActive() ? 1 : 0);
oStatement.AddColumn("distributionlistaddress", pDistList->GetAddress());
oStatement.AddColumn("distributionlistrequireauth", pDistList->GetRequireAuth() ? 1 : 0);
oStatement.AddColumn("distributionlistrequireaddress", pDistList->GetRequireAddress());
oStatement.AddColumn("distributionlistmode", pDistList->GetListMode());
if (pDistList->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("distributionlistid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("distributionlistid = %I64d"), pDistList->GetID());
oStatement.SetWhereClause(sWhere);
}
bool bNewObject = pDistList->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pDistList->SetID((int) iDBID);
Cache<DistributionList>::Instance()->RemoveObject(pDistList);
return bRetVal;
}
示例10:
bool
PersistentAlias::SaveObject(std::shared_ptr<Alias> pAlias, String &sErrorMessage, PersistenceMode mode)
{
if (!PreSaveLimitationsCheck::CheckLimitations(mode, pAlias, sErrorMessage))
return false;
SQLStatement oStatement;
oStatement.SetTable("hm_aliases");
oStatement.AddColumnInt64("aliasdomainid", pAlias->GetDomainID());
oStatement.AddColumn("aliasname", pAlias->GetName());
oStatement.AddColumn("aliasvalue", pAlias->GetValue());
oStatement.AddColumn("aliasactive", pAlias->GetIsActive());
if (pAlias->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("aliasid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("aliasid = %I64d"), pAlias->GetID());
oStatement.SetWhereClause(sWhere);
}
bool bNewObject = pAlias->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pAlias->SetID((int) iDBID);
Cache<Alias>::Instance()->RemoveObject(pAlias);
return bRetVal;
}
示例11:
bool
PersistentRuleCriteria::SaveObject(std::shared_ptr<RuleCriteria> pRuleCriteria)
{
SQLStatement oStatement;
oStatement.SetTable("hm_rule_criterias");
bool bNewObject = pRuleCriteria->GetID() == 0;
if (bNewObject)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("criteriaid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("criteriaid = %I64d"), pRuleCriteria->GetID());
oStatement.SetWhereClause(sWhere);
}
oStatement.AddColumnInt64("criteriaruleid", pRuleCriteria->GetRuleID());
oStatement.AddColumn("criteriausepredefined", pRuleCriteria->GetUsePredefined());
oStatement.AddColumn("criteriapredefinedfield", pRuleCriteria->GetPredefinedField());
oStatement.AddColumn("criteriaheadername", pRuleCriteria->GetHeaderField());
oStatement.AddColumn("criteriamatchtype", pRuleCriteria->GetMatchType());
oStatement.AddColumn("criteriamatchvalue", pRuleCriteria->GetMatchValue());
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pRuleCriteria->SetID((int) iDBID);
return bRetVal;
}
示例12:
bool
PersistentDomainAlias::SaveObject(shared_ptr<DomainAlias> oDA, String &sErrorMessage)
{
if (!PreSaveLimitationsCheck::CheckLimitations(oDA, sErrorMessage))
return false;
SQLStatement oStatement;
oStatement.SetTable("hm_domain_aliases");
bool bNewObject = oDA->GetID() == 0;
oStatement.AddColumnInt64("dadomainid", oDA->GetDomainID());
oStatement.AddColumn("daalias", oDA->GetAlias());
if (bNewObject)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("daid");
}
else
{
String sWhere;
sWhere.Format(_T("daid = %I64d"), oDA->GetID());
oStatement.SetStatementType(SQLStatement::STUpdate);
oStatement.SetWhereClause(sWhere);
}
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
oDA->SetID((int) iDBID);
ObjectCache::Instance()->SetDomainAliasesNeedsReload();
return true;
}
示例13:
bool
PersistentMessageMetaData::SaveObject(boost::shared_ptr<MessageMetaData> metaData)
{
SQLStatement statement;
statement.SetTable("hm_message_metadata");
statement.SetStatementType(SQLStatement::STInsert);
statement.SetIdentityColumn("metadata_id");
statement.AddColumn("metadata_accountid", metaData->GetAccountID());
statement.AddColumn("metadata_folderid", metaData->GetFolderID());
statement.AddColumnInt64("metadata_messageid", metaData->GetMessageID());
statement.AddColumnDate("metadata_dateutc", metaData->GetDate());
statement.AddColumn("metadata_from", metaData->GetFrom(), 100);
statement.AddColumn("metadata_subject", metaData->GetSubject(), 100);
statement.AddColumn("metadata_to", metaData->GetTo(), 100);
statement.AddColumn("metadata_cc", metaData->GetCC(), 100);
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(statement, &iDBID);
metaData->SetID((int) iDBID);
return bRetVal;
}
示例14: Account
bool
PersistentAccount::SaveObject(boost::shared_ptr<Account> pAccount, String &sErrorMessage, bool createInbox)
{
if (!PreSaveLimitationsCheck::CheckLimitations(pAccount, sErrorMessage))
return false;
__int64 iID = pAccount->GetID();
if (iID > 0)
{
// First read the domain to see if we've changed its name.
boost::shared_ptr<Account> tempAccount = boost::shared_ptr<Account>(new Account());
if (!PersistentAccount::ReadObject(tempAccount, iID))
return false;
if (tempAccount->GetAddress().CompareNoCase(pAccount->GetAddress()) != 0)
{
// Check if this account contains messages with full path. If so, the user cannot
// rename it at this point.
// Disallow change, if not all files are partial in the database.
if (!PersistentMessage::GetAllMessageFilesArePartialNames())
{
sErrorMessage = "As of hMailServer 5.4, partial file names are stored in the database, rather than the full path\r\n"
"To be able to rename the account, you must first migrate your database to the new partial paths scheme. To do\r\n"
"this, run Data Directory Synchronizer.";
return false;
}
// Name has been changed. Rename all sub objects first.
NameChanger nameChanger;
if (!nameChanger.RenameAccount(tempAccount->GetAddress(), pAccount, sErrorMessage))
return false;
// Remove the old account from the cache.
Cache<Account, PersistentAccount>::Instance()->RemoveObject(tempAccount->GetAddress());
}
}
SQLStatement oStatement;
oStatement.AddColumnInt64("accountdomainid", pAccount->GetDomainID());
oStatement.AddColumn("accountaddress", pAccount->GetAddress());
oStatement.AddColumn("accountpassword", pAccount->GetPassword());
oStatement.AddColumn("accountactive", pAccount->GetActive());
oStatement.AddColumn("accountisad", pAccount->GetIsAD());
oStatement.AddColumn("accountaddomain", pAccount->GetADDomain());
oStatement.AddColumn("accountadusername", pAccount->GetADUsername());
oStatement.AddColumn("accountmaxsize", pAccount->GetAccountMaxSize());
oStatement.AddColumn("accountvacationmessageon", pAccount->GetVacationMessageIsOn());
oStatement.AddColumn("accountvacationmessage", pAccount->GetVacationMessage());
oStatement.AddColumn("accountvacationsubject", pAccount->GetVacationSubject());
oStatement.AddColumn("accountvacationexpires", pAccount->GetVacationExpires());
oStatement.AddColumn("accountvacationexpiredate", pAccount->GetVacationExpiresDate());
oStatement.AddColumn("accountpwencryption", pAccount->GetPasswordEncryption());
oStatement.AddColumn("accountadminlevel", pAccount->GetAdminLevel());
oStatement.AddColumn("accountforwardenabled", pAccount->GetForwardEnabled());
oStatement.AddColumn("accountforwardaddress", pAccount->GetForwardAddress());
oStatement.AddColumn("accountforwardkeeporiginal", pAccount->GetForwardKeepOriginal());
oStatement.AddColumn("accountenablesignature", pAccount->GetEnableSignature());
oStatement.AddColumn("accountsignatureplaintext", pAccount->GetSignaturePlainText());
oStatement.AddColumn("accountsignaturehtml", pAccount->GetSignatureHTML());
oStatement.AddColumn("accountlastlogontime", pAccount->GetLastLogonTime());
oStatement.AddColumn("accountpersonfirstname", pAccount->GetPersonFirstName());
oStatement.AddColumn("accountpersonlastname", pAccount->GetPersonLastName());
oStatement.SetTable("hm_accounts");
if (pAccount->GetID() == 0)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("accountid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("accountid = %I64d"), pAccount->GetID());
oStatement.SetWhereClause(sWhere);
}
bool bNewObject = pAccount->GetID() == 0;
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
{
pAccount->SetID((long) iDBID);
if (createInbox)
{
if (!CreateInbox(*pAccount))
//.........这里部分代码省略.........
示例15: command
bool
PersistentRule::SaveObject(shared_ptr<Rule> pRule)
{
SQLStatement oStatement;
oStatement.SetTable("hm_rules");
bool bNewObject = pRule->GetID() == 0;
if (bNewObject)
{
oStatement.SetStatementType(SQLStatement::STInsert);
oStatement.SetIdentityColumn("ruleid");
}
else
{
oStatement.SetStatementType(SQLStatement::STUpdate);
String sWhere;
sWhere.Format(_T("ruleid = %I64d"), pRule->GetID());
oStatement.SetWhereClause(sWhere);
}
oStatement.AddColumnInt64("ruleaccountid", pRule->GetAccountID());
oStatement.AddColumn("rulename", pRule->GetName());
oStatement.AddColumn("ruleactive", 0);
oStatement.AddColumn("ruleuseand", pRule->GetUseAND());
oStatement.AddColumn("rulesortorder", pRule->GetSortOrder());
// Save and fetch ID
__int64 iDBID = 0;
bool bRetVal = Application::Instance()->GetDBManager()->Execute(oStatement, bNewObject ? &iDBID : 0);
if (bRetVal && bNewObject)
pRule->SetID((int) iDBID);
// Save criterias.
__int64 iRuleID = pRule->GetID();
shared_ptr<RuleCriterias> pRuleCriterias = pRule->GetCriterias();
for (int i = 0; i < pRuleCriterias->GetCount(); i++)
{
shared_ptr<RuleCriteria> pRuleCriteria = pRuleCriterias->GetItem(i);
pRuleCriteria->SetRuleID(iRuleID);
PersistentRuleCriteria::SaveObject(pRuleCriteria);
}
// Save actions
shared_ptr<RuleActions> pRuleActions = pRule->GetActions();
for (int i = 0; i < pRuleActions->GetCount(); i++)
{
shared_ptr<RuleAction> pRuleAction = pRuleActions->GetItem(i);
pRuleAction->SetRuleID(iRuleID);
PersistentRuleAction::SaveObject(pRuleAction);
}
// Set the rule to active again.
SQLCommand command("update hm_rules set ruleactive = @ACTIVE where ruleid = @RULEID");
command.AddParameter("@ACTIVE", pRule->GetActive());
command.AddParameter("@RULEID", iRuleID);
bRetVal = Application::Instance()->GetDBManager()->Execute(command);
_NotifyReload(pRule);
return bRetVal;
}