当前位置: 首页>>代码示例>>C++>>正文


C++ Driver::DropAllSpecTables方法代码示例

本文整理汇总了C++中Driver::DropAllSpecTables方法的典型用法代码示例。如果您正苦于以下问题:C++ Driver::DropAllSpecTables方法的具体用法?C++ Driver::DropAllSpecTables怎么用?C++ Driver::DropAllSpecTables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Driver的用法示例。


在下文中一共展示了Driver::DropAllSpecTables方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QueryResponse

void UnitCfg::QueryResponse (QObject *p, const QString &c, int State, QObject*caller) // notify transaction completerequestrt needs the name record addedivityLled int2);, tion text,repprint int2);ate text);
{
	if(p != this) return;

	IT_IT("UnitCfg::QueryResponse");

	switch (State)
	{
		case tList:
		{
			// fill the name list box
			GetConfigureDb ()->FillComboBox (Name, "NAME");
			Name->setCurrentItem (0);
			SelChanged (0);
			Name->setFocus ();
			ButtonState (true);
		};
		break;
		case tItem:
		{
			IT_COMMENT("Received User Data");
			// fill the fields     
			Comment->setText (UndoEscapeSQLText(GetConfigureDb()->GetString ("COMMENT")));
			SetComboItem (UnitType, GetConfigureDb ()->GetString ("UNITTYPE"));
			Enabled->setChecked (GetConfigureDb ()->GetString ("ENABLED").toInt ());
			Comment->setFocus ();
			ButtonState (true);
		};
		break;
		case tDrop:
		{
			int n = GetConfigureDb()->GetNumberResults();
			
			QStringList list;
			QString point_list = "(";
			if (n)
			{
				for(int i = 0; i < n; i++,GetConfigureDb()->FetchNext())
				{
					if(i)
					{
						point_list += ",";
					};
					point_list += "'" + GetConfigureDb()->GetString("NAME") + "'";
					//
					list << GetConfigureDb()->GetString ("NAME");
				};

				point_list += ");";
			}

			QString cmd ="delete from TAGS_DB where NAME in " + point_list;
			GetCurrentDb ()->DoExec (0,cmd,0);
			//
			cmd ="delete from CVAL_DB where NAME in " + point_list;
			GetCurrentDb ()->DoExec (0,cmd,0);

			
			if(!list.isEmpty())
			{
				QStringList::Iterator it = list.begin();
				for(;it != list.end();++it)
				{
					QString cmd = "drop table "+ (*it) + ";";
					GetResultDb()->DoExec(0,cmd,0);
				}
			}

			//TO DO APA caricare tutti i Driver *p in un dizionario come fa il monitor
			//e poi usarli quando e' necessario
			Driver * p = FindDriver(UnitType->currentText());
			if(p)
			{
				DOAUDIT(tr("Drop Unit Tables:") + Name->currentText());
				p->DropAllSpecTables(list); // invoked the unit level drop tables 
			}

		}
		break;
		case tNew:
		case tDelete:
		case tApply:
		ButtonState (true);
		default:
		break;
	};
};
开发者ID:jiajw0426,项目名称:easyscada,代码行数:87,代码来源:UnitCfg.cpp


注:本文中的Driver::DropAllSpecTables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。