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

📄 dbinterface.c

📁 一个和TOP程序差不多功能的程序
💻 C
📖 第 1 页 / 共 3 页
字号:
           }
# line 94 "dbInterface.cpp"
           

           /*
           ** Generated code ends here.
           */
# line 94 "dbInterface.cpp"

	
           /*
           ** SQL STATEMENT: 9
           ** exec sql commit work;

           */
# line 95 "dbInterface.cpp"
# line 95 "dbInterface.cpp"
           {
# line 95 "dbInterface.cpp"
                _SQL_CT_HANDLES * _sql;
# line 95 "dbInterface.cpp"
               _sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long 
# line 95 "dbInterface.cpp"
                   *)NULL, (CS_CHAR *)NULL);
# line 95 "dbInterface.cpp"
               if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 95 "dbInterface.cpp"
               {
# line 95 "dbInterface.cpp"
                   _sql->stmtData.persistent = CS_FALSE;
# line 95 "dbInterface.cpp"
                   _sql->stmttype = SQL_TRANS;
# line 95 "dbInterface.cpp"
                   _sql->connName.lnlen = CS_UNUSED;
# line 95 "dbInterface.cpp"
                   if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 95 "dbInterface.cpp"
                   {
# line 95 "dbInterface.cpp"
                       _sql->retcode = ct_command(_sql->conn.command, 
# line 95 "dbInterface.cpp"
                           CS_LANG_CMD, "commit work", 11, CS_UNUSED);
# line 95 "dbInterface.cpp"
                       _sql->retcode = ct_send(_sql->conn.command);
# line 95 "dbInterface.cpp"
                       _sql->hastate = (_sql->retcode == CS_RET_HAFAILOVER);
# line 95 "dbInterface.cpp"
                       _sql->retcode = _sqlResults(_sql);
# line 95 "dbInterface.cpp"
                       _sql->retcode = _sqlepilog(_sql);
# line 95 "dbInterface.cpp"
                   }
# line 95 "dbInterface.cpp"
                   
# line 95 "dbInterface.cpp"
               }
# line 95 "dbInterface.cpp"
               
# line 95 "dbInterface.cpp"
           }
# line 95 "dbInterface.cpp"
           

           /*
           ** Generated code ends here.
           */
# line 95 "dbInterface.cpp"

	
           /*
           ** SQL STATEMENT: 10
           ** exec sql update SapDB.dbo.TBL_RealtimeStatus set UpdateTime=:TimeSt
           ** atus.UpdateTime,NEavailability=:TimeStatus.NEavailability,NEcpu=:
           ** TimeStatus.NEcpu,NEram=:TimeStatus.NEram,NEhd=:TimeStatus.NEhd wh
           ** ere NEname=:TimeStatus.NEname and NEid=:TimeStatus.NEid;
           */
# line 96 "dbInterface.cpp"
# line 96 "dbInterface.cpp"
           {
# line 96 "dbInterface.cpp"
                _SQL_CT_HANDLES * _sql;
# line 96 "dbInterface.cpp"
               _sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long 
# line 96 "dbInterface.cpp"
                   *)NULL, (CS_CHAR *)NULL);
# line 96 "dbInterface.cpp"
               if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 96 "dbInterface.cpp"
               {
# line 96 "dbInterface.cpp"
                   _sql->stmtIdlen = CS_UNUSED;
# line 96 "dbInterface.cpp"
                   _sql->stmtData.persistent = CS_FALSE;
# line 96 "dbInterface.cpp"
                   _sql->stmttype = SQL_UPDATE_SEARCHED;
# line 96 "dbInterface.cpp"
                   _sql->connName.lnlen = CS_UNUSED;
# line 96 "dbInterface.cpp"
                   if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                   {
# line 96 "dbInterface.cpp"
                       _sql->retcode = ct_command(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                           CS_LANG_CMD, "update SapDB.dbo.TBL_RealtimeStatus se"
"t UpdateTime=@sql0_UpdateTime ,NEavailability=@sql1_NEavailability ,NEcpu=@sql"
"2_NEcpu ,NEram=@sql3_NEram ,NEhd=@sql4_NEhd where NEname=@sql5_NEname and NEid"
"=@sql6_NEid ", 206, CS_UNUSED);
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.maxlength = 
# line 96 "dbInterface.cpp"
                           _sql_MIN(16384,32);
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.format = CS_FMT_NULLTERM;
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtNULLCHAR, 
# line 96 "dbInterface.cpp"
                           SQLNULLSTR(TimeStatus.UpdateTime), (CS_INT) 
# line 96 "dbInterface.cpp"
                               CS_NULLTERM, (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtCS_INT_TYPE, 
# line 96 "dbInterface.cpp"
                               &TimeStatus.NEavailability, (CS_INT) CS_UNUSED, 
# line 96 "dbInterface.cpp"
                               (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtCS_FLOAT_TYPE, &TimeStatus.NEcpu, 
# line 96 "dbInterface.cpp"
                               (CS_INT) CS_UNUSED, (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtCS_FLOAT_TYPE, &TimeStatus.NEram, 
# line 96 "dbInterface.cpp"
                               (CS_INT) CS_UNUSED, (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtCS_FLOAT_TYPE, &TimeStatus.NEhd, 
# line 96 "dbInterface.cpp"
                               (CS_INT) CS_UNUSED, (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_FLOAT_TYPE.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.maxlength = 
# line 96 "dbInterface.cpp"
                           _sql_MIN(16384,64);
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.format = CS_FMT_NULLTERM;
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtNULLCHAR, 
# line 96 "dbInterface.cpp"
                           SQLNULLSTR(TimeStatus.NEname), (CS_INT) CS_NULLTERM,
# line 96 "dbInterface.cpp"
                                (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtNULLCHAR.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       if (_sql->retcode == CS_SUCCEED)
# line 96 "dbInterface.cpp"
                       {
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.count = 0;
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.status = CS_INPUTVALUE;
# line 96 "dbInterface.cpp"
                           _sql->retcode = ct_param(_sql->conn.command, 
# line 96 "dbInterface.cpp"
                               &_sql->dfmtCS_INT_TYPE, &TimeStatus.NEid, 
# line 96 "dbInterface.cpp"
                               (CS_INT) CS_UNUSED, (CS_SMALLINT) 0);
# line 96 "dbInterface.cpp"
                           _sql->dfmtCS_INT_TYPE.status = 0;
# line 96 "dbInterface.cpp"
                       }
# line 96 "dbInterface.cpp"
                       
# line 96 "dbInterface.cpp"
                       _sql->retcode = ct_send(_sql->conn.command);
# line 96 "dbInterface.cpp"
                       _sql->hastate = (_sql->retcode == CS_RET_HAFAILOVER);
# line 96 "dbInterface.cpp"
                       _sql->retcode = _sqlResults(_sql);
# line 96 "dbInterface.cpp"
                       _sql->retcode = _sqlepilog(_sql);
# line 96 "dbInterface.cpp"
                   }
# line 96 "dbInterface.cpp"
                   
# line 96 "dbInterface.cpp"
               }
# line 96 "dbInterface.cpp"
               
# line 96 "dbInterface.cpp"
           }
# line 96 "dbInterface.cpp"
           

           /*
           ** Generated code ends here.
           */
# line 96 "dbInterface.cpp"

	if(0!=sqlca.sqlcode)
		return sqlca.sqlcode;
    
           /*
           ** SQL STATEMENT: 11
           ** exec sql commit work;

           */
# line 99 "dbInterface.cpp"
# line 99 "dbInterface.cpp"
           {
# line 99 "dbInterface.cpp"
                _SQL_CT_HANDLES * _sql;
# line 99 "dbInterface.cpp"
               _sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long 
# line 99 "dbInterface.cpp"
                   *)NULL, (CS_CHAR *)NULL);
# line 99 "dbInterface.cpp"
               if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 99 "dbInterface.cpp"
               {
# line 99 "dbInterface.cpp"
                   _sql->stmtData.persistent = CS_FALSE;
# line 99 "dbInterface.cpp"
                   _sql->stmttype = SQL_TRANS;
# line 99 "dbInterface.cpp"
                   _sql->connName.lnlen = CS_UNUSED;
# line 99 "dbInterface.cpp"
                   if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 99 "dbInterface.cpp"
                   {
# line 99 "dbInterface.cpp"
                       _sql->retcode = ct_command(_sql->conn.command, 
# line 99 "dbInterface.cpp"
                           CS_LANG_CMD, "commit work", 11, CS_UNUSED);
# line 99 "dbInterface.cpp"
                       _sql->retcode = ct_send(_sql->conn.command);
# line 99 "dbInterface.cpp"
                       _sql->hastate = (_sql->retcode == CS_RET_HAFAILOVER);
# line 99 "dbInterface.cpp"
                       _sql->retcode = _sqlResults(_sql);
# line 99 "dbInterface.cpp"
                       _sql->retcode = _sqlepilog(_sql);
# line 99 "dbInterface.cpp"
                   }
# line 99 "dbInterface.cpp"
                   
# line 99 "dbInterface.cpp"
               }
# line 99 "dbInterface.cpp"
               
# line 99 "dbInterface.cpp"
           }
# line 99 "dbInterface.cpp"
           

           /*
           ** Generated code ends here.
           */
# line 99 "dbInterface.cpp"

    return sqlca.sqlcode;
}
void CommitWork()
{
	
           /*
           ** SQL STATEMENT: 12
           ** exec sql commit work;

           */
# line 104 "dbInterface.cpp"
# line 104 "dbInterface.cpp"
           {
# line 104 "dbInterface.cpp"
                _SQL_CT_HANDLES * _sql;
# line 104 "dbInterface.cpp"
               _sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long 
# line 104 "dbInterface.cpp"
                   *)NULL, (CS_CHAR *)NULL);
# line 104 "dbInterface.cpp"
               if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 104 "dbInterface.cpp"
               {
# line 104 "dbInterface.cpp"
                   _sql->stmtData.persistent = CS_FALSE;
# line 104 "dbInterface.cpp"
                   _sql->stmttype = SQL_TRANS;
# line 104 "dbInterface.cpp"
                   _sql->connName.lnlen = CS_UNUSED;
# line 104 "dbInterface.cpp"
                   if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 104 "dbInterface.cpp"
                   {
# line 104 "dbInterface.cpp"
                       _sql->retcode = ct_command(_sql->conn.command, 
# line 104 "dbInterface.cpp"
                           CS_LANG_CMD, "commit work", 11, CS_UNUSED);
# line 104 "dbInterface.cpp"
                       _sql->retcode = ct_send(_sql->conn.command);
# line 104 "dbInterface.cpp"
                       _sql->hastate = (_sql->retcode == CS_RET_HAFAILOVER);
# line 104 "dbInterface.cpp"
                       _sql->retcode = _sqlResults(_sql);
# line 104 "dbInterface.cpp"
                       _sql->retcode = _sqlepilog(_sql);
# line 104 "dbInterface.cpp"
                   }
# line 104 "dbInterface.cpp"
                   
# line 104 "dbInterface.cpp"
               }
# line 104 "dbInterface.cpp"
               
# line 104 "dbInterface.cpp"
           }
# line 104 "dbInterface.cpp"
           

           /*
           ** Generated code ends here.
           */
# line 104 "dbInterface.cpp"

}

           /*
           ** Generated code begins here.
           */
# line 106 "dbInterface.cpp"

           /*
           ** Generated code ends here.
           */
# line 106 "dbInterface.cpp"

⌨️ 快捷键说明

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