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

📄 count.cpp

📁 毕业生信息管理系统的基本功能是对毕业生的信息进行管理
💻 CPP
字号:
// Count.cpp: implementation of the CCount class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "BySys.h"
#include "Count.h"
#include "ADOConn.h"

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

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

CCount::CCount()
{
	num = 0;

}

CCount::~CCount()
{

}

int CCount::GetCount(CString cSearch)
{
	int iCount;

	//连接数据库
	ADOConn m_AdoConn;
	m_AdoConn.OnInitADOConn();

	//设置COUNT语句
	_bstr_t vSQL;
	vSQL = "SELECT count('"+cSearch+"') from Base_Mat";
	//执行COUNT语句
	iCount = m_AdoConn.ExecuteSQL(vSQL);	
	//断开与数据库的连接
	m_AdoConn.ExitConnect();

	return iCount;
}

⌨️ 快捷键说明

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