添加视图修改
视图-v的按照学号修改此人有作弊嫌疑
This commit is contained in:
@@ -137,13 +137,16 @@ int DbUpdate(string stuNum, vector<string> dateVec, vector<string> subjectVec, v
|
||||
|
||||
/*更新字串设置*/
|
||||
int count = subjectVec.size();
|
||||
|
||||
vector<string> sqlKC; //课程表:作弊第一字段
|
||||
int ci = 0; //循环
|
||||
|
||||
|
||||
/*构造更新语句*/
|
||||
string flag = "0";
|
||||
/*构造更新语句--KC表的更新 */
|
||||
for (ci = 0; ci < count; ++ci)
|
||||
{
|
||||
if(flagVec[ci]=="1") // 此人若有作弊嫌疑的图像,就认定此人为作弊嫌疑
|
||||
flag = "1";
|
||||
|
||||
/*作弊的*/
|
||||
string sqlKC1 = "UPDATE ";
|
||||
sqlKC1 += g_db_hoster_zk;
|
||||
@@ -160,7 +163,11 @@ int DbUpdate(string stuNum, vector<string> dateVec, vector<string> subjectVec, v
|
||||
|
||||
sqlKC.push_back(sqlKC1);
|
||||
}
|
||||
|
||||
/* 更新语句--视图更新 */
|
||||
string sqlView = "UPDATE YANNSY.V_BYSQ_BJSH_JQ_KS SET BJSH_JG_JQ=";
|
||||
sqlView += flag;
|
||||
sqlView += "WHERE KS_ZKZ = ";
|
||||
sqlView += stuNum;
|
||||
::CoInitialize(NULL);//初始化com组件
|
||||
|
||||
/*更新数据库表*/
|
||||
@@ -181,6 +188,11 @@ int DbUpdate(string stuNum, vector<string> dateVec, vector<string> subjectVec, v
|
||||
adLockOptimistic,
|
||||
adCmdText);
|
||||
}
|
||||
p_recordset->Open(_bstr_t(sqlView.c_str()),//更新第二条
|
||||
p_conn.GetInterfacePtr(),
|
||||
adOpenStatic,
|
||||
adLockOptimistic,
|
||||
adCmdText);
|
||||
}
|
||||
catch (_com_error e){ return 0; cerr << "Err:"; }
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <windows.h>
|
||||
#include <iomanip>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\资料\opencv属性表-台式机\opencv2413_debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\..\资料\opencv属性表-台式机\opencv2413_release.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
|
||||
Reference in New Issue
Block a user