⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comsetdm.cpp

📁 本程序采用VC++和MySql编写的田间信息自动采集系统
💻 CPP
字号:
// ComSetDM.cpp: implementation of the CComSetDM class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "rt.h"
#include "ComSetDM.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

#define CREATETABLE "create table ComSet (stopBit char(5),hand char(10),port char(5) ,parity char(5), dataBit char(5) , baudRate char(5))"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CComSetDM::CComSetDM()
{
   m_sTableName = _T("ComSet");
   if(!ExistTable(m_sTableName)){
	   CreateTable(CREATETABLE);
	   CString temp = "insert into ComSet values (";
       temp +=  "'1','None','COM3','N','8','2400')";
	   //AfxMessageBox(temp);
	   Insert(temp);
   }
}

CComSetDM::~CComSetDM()
{

}



void CComSetDM::Add(CString sql)
{
   Insert(sql);
   return;
}

void CComSetDM::Modify(CString sql)
{
  Update(sql);
  return;
}

CCustResultSet CComSetDM::select()
{
 SetSql("select * from "+m_sTableName);
 return Exculte();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -