📄 dbinterface.c
字号:
if(0 != isFromBegin)
{
/*
** SQL STATEMENT: 14
** exec sql close SMSendStrategy;
*/
# line 170 "dbInterface.cpp"
# line 170 "dbInterface.cpp"
{
# line 170 "dbInterface.cpp"
_SQL_CT_HANDLES * _sql;
# line 170 "dbInterface.cpp"
_sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long
# line 170 "dbInterface.cpp"
*)NULL, (CS_CHAR *)NULL);
# line 170 "dbInterface.cpp"
if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 170 "dbInterface.cpp"
{
# line 170 "dbInterface.cpp"
_sql->stmtData.persistent = CS_FALSE;
# line 170 "dbInterface.cpp"
_sql->stmttype = SQL_CLOSE_STMT;
# line 170 "dbInterface.cpp"
_sql->connName.lnlen = CS_UNUSED;
# line 170 "dbInterface.cpp"
_sql->curName.fnlen = 14;
# line 170 "dbInterface.cpp"
strcpy(_sql->curName.first_name, "SMSendStrategy");
# line 170 "dbInterface.cpp"
if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 170 "dbInterface.cpp"
{
# line 170 "dbInterface.cpp"
_sql->retcode = _sqlepilog(_sql);
# line 170 "dbInterface.cpp"
}
# line 170 "dbInterface.cpp"
# line 170 "dbInterface.cpp"
}
# line 170 "dbInterface.cpp"
# line 170 "dbInterface.cpp"
}
# line 170 "dbInterface.cpp"
/*
** Generated code ends here.
*/
# line 170 "dbInterface.cpp"
/*
** SQL STATEMENT: 15
** exec sql open SMSendStrategy;
*/
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
_SQL_CT_HANDLES * _sql;
# line 171 "dbInterface.cpp"
_sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long
# line 171 "dbInterface.cpp"
*)NULL, (CS_CHAR *)NULL);
# line 171 "dbInterface.cpp"
if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
_sql->stmtData.persistent = CS_FALSE;
# line 171 "dbInterface.cpp"
_sql->moreData.curData.norebind = CS_FALSE;
# line 171 "dbInterface.cpp"
_sql->stmttype = SQL_OPEN_STMT;
# line 171 "dbInterface.cpp"
_sql->connName.lnlen = CS_UNUSED;
# line 171 "dbInterface.cpp"
_sql->curName.fnlen = 14;
# line 171 "dbInterface.cpp"
strcpy(_sql->curName.first_name, "SMSendStrategy");
# line 171 "dbInterface.cpp"
if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
if (_sql->doDecl == CS_TRUE)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cursor(_sql->conn.command,
# line 171 "dbInterface.cpp"
CS_CURSOR_DECLARE, "SMSendStrategy", 14, "select"
" * from SapDB.dbo.TBL_SMSendStrategy", 42, CS_UNUSED);
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
if (_sql->retcode == CS_SUCCEED)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
if (_sql->stmtData.persistent == CS_TRUE)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cursor(_sql->conn.command,
# line 171 "dbInterface.cpp"
CS_CURSOR_OPEN, NULL, CS_UNUSED, NULL,
# line 171 "dbInterface.cpp"
CS_UNUSED, CS_RESTORE_OPEN);
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
else {
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cursor(_sql->conn.command,
# line 171 "dbInterface.cpp"
CS_CURSOR_OPEN, NULL, CS_UNUSED, NULL,
# line 171 "dbInterface.cpp"
CS_UNUSED, CS_UNUSED);
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
if (_sql->retcode == CS_SUCCEED)
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
_sql->retcode = ct_send(_sql->conn.command);
# line 171 "dbInterface.cpp"
_sql->hastate = (_sql->retcode ==
# line 171 "dbInterface.cpp"
CS_RET_HAFAILOVER);
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
_sql->resloop = CS_TRUE;
# line 171 "dbInterface.cpp"
while ((!_sql->hastate) && (_sql->resloop == CS_TRUE)
# line 171 "dbInterface.cpp"
&& ((_sql->retcode = ct_results(_sql->conn.command,
# line 171 "dbInterface.cpp"
&_sql->restype)) == CS_SUCCEED))
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
switch ( _sql->restype )
# line 171 "dbInterface.cpp"
{
# line 171 "dbInterface.cpp"
case CS_COMPUTE_RESULT:
# line 171 "dbInterface.cpp"
_sqlsetintrerr(_sql, (CS_INT)
# line 171 "dbInterface.cpp"
_SQL_INTRERR_25003);
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cancel(NULL,
# line 171 "dbInterface.cpp"
_sql->conn.command, CS_CANCEL_CURRENT);
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
case CS_CURSOR_RESULT:
# line 171 "dbInterface.cpp"
_sql->resloop = CS_FALSE;
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
case CS_PARAM_RESULT:
# line 171 "dbInterface.cpp"
_sqlsetintrerr(_sql, (CS_INT)
# line 171 "dbInterface.cpp"
_SQL_INTRERR_25005);
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cancel(NULL,
# line 171 "dbInterface.cpp"
_sql->conn.command, CS_CANCEL_CURRENT);
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
case CS_ROW_RESULT:
# line 171 "dbInterface.cpp"
_sqlsetintrerr(_sql, (CS_INT)
# line 171 "dbInterface.cpp"
_SQL_INTRERR_25006);
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cancel(NULL,
# line 171 "dbInterface.cpp"
_sql->conn.command, CS_CANCEL_CURRENT);
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
case CS_STATUS_RESULT:
# line 171 "dbInterface.cpp"
_sqlsetintrerr(_sql, (CS_INT)
# line 171 "dbInterface.cpp"
_SQL_INTRERR_25009);
# line 171 "dbInterface.cpp"
_sql->retcode = ct_cancel(NULL,
# line 171 "dbInterface.cpp"
_sql->conn.command, CS_CANCEL_CURRENT);
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
case CS_DESCRIBE_RESULT:
# line 171 "dbInterface.cpp"
_sqlsetintrerr(_sql, (CS_INT)
# line 171 "dbInterface.cpp"
_SQL_INTRERR_25010);
# line 171 "dbInterface.cpp"
break;
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
_sql->retcode = _sqlepilog(_sql);
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
# line 171 "dbInterface.cpp"
}
# line 171 "dbInterface.cpp"
/*
** Generated code ends here.
*/
# line 171 "dbInterface.cpp"
if(sqlca.sqlcode < 0) return sqlca.sqlcode;
}
memset(&Strategy, 0, sizeof(Strategy));
/*
** SQL STATEMENT: 16
** exec sql fetch SMSendStrategy into :Strategy.InfoType, :Strategy.Al
** armMode,:Strategy.DelayTime,:Strategy.DelayCount,:Strategy.MSISDN
** _AlarmList;
*/
# line 176 "dbInterface.cpp"
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_SQL_CT_HANDLES * _sql;
# line 176 "dbInterface.cpp"
_sqlinitctx(&_sql, CS_VERSION_150, CS_TRUE, &sqlca, (long
# line 176 "dbInterface.cpp"
*)NULL, (CS_CHAR *)NULL);
# line 176 "dbInterface.cpp"
if (_sql != (_SQL_CT_HANDLES *) NULL)
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_sql->stmtData.persistent = CS_FALSE;
# line 176 "dbInterface.cpp"
_sql->stmttype = SQL_FETCH_STMT;
# line 176 "dbInterface.cpp"
_sql->connName.lnlen = CS_UNUSED;
# line 176 "dbInterface.cpp"
_sql->curName.fnlen = 14;
# line 176 "dbInterface.cpp"
strcpy(_sql->curName.first_name, "SMSendStrategy");
# line 176 "dbInterface.cpp"
if ((_sql->retcode = _sqlprolog(_sql)) == CS_SUCCEED)
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_sql->doDecl = CS_FALSE;
# line 176 "dbInterface.cpp"
if ((_sql->stmtData.bind == CS_TRUE) ||
# line 176 "dbInterface.cpp"
(_sql->moreData.curData.norebind == CS_FALSE))
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_sql->dfmtCS_INT_TYPE.count = 0;
# line 176 "dbInterface.cpp"
_sql->retcode = ct_bind(_sql->conn.command, 1,
# line 176 "dbInterface.cpp"
&_sql->dfmtCS_INT_TYPE, &Strategy.InfoType,
# line 176 "dbInterface.cpp"
NULL, NULL);
# line 176 "dbInterface.cpp"
_sql->dfmtCS_TINYINT_TYPE.count = 0;
# line 176 "dbInterface.cpp"
_sql->retcode = ct_bind(_sql->conn.command, 2,
# line 176 "dbInterface.cpp"
&_sql->dfmtCS_TINYINT_TYPE,
# line 176 "dbInterface.cpp"
&Strategy.AlarmMode, NULL, NULL);
# line 176 "dbInterface.cpp"
_sql->dfmtCS_INT_TYPE.count = 0;
# line 176 "dbInterface.cpp"
_sql->retcode = ct_bind(_sql->conn.command, 3,
# line 176 "dbInterface.cpp"
&_sql->dfmtCS_INT_TYPE, &Strategy.DelayTime,
# line 176 "dbInterface.cpp"
NULL, NULL);
# line 176 "dbInterface.cpp"
_sql->dfmtCS_INT_TYPE.count = 0;
# line 176 "dbInterface.cpp"
_sql->retcode = ct_bind(_sql->conn.command, 4,
# line 176 "dbInterface.cpp"
&_sql->dfmtCS_INT_TYPE,
# line 176 "dbInterface.cpp"
&Strategy.DelayCount, NULL, NULL);
# line 176 "dbInterface.cpp"
_sql->dfmtNULLCHAR.count = 0;
# line 176 "dbInterface.cpp"
_sql->dfmtNULLCHAR.maxlength = 128;
# line 176 "dbInterface.cpp"
_sql->dfmtNULLCHAR.format = CS_FMT_NULLTERM;
# line 176 "dbInterface.cpp"
_sql->retcode = ct_bind(_sql->conn.command, 5,
# line 176 "dbInterface.cpp"
&_sql->dfmtNULLCHAR,
# line 176 "dbInterface.cpp"
Strategy.MSISDN_AlarmList, NULL, NULL);
# line 176 "dbInterface.cpp"
if (_sql->stmtData.bind == CS_TRUE)
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_sql->stmtData.bind = CS_FALSE;
# line 176 "dbInterface.cpp"
_sql->doDecl = CS_TRUE;
# line 176 "dbInterface.cpp"
}
# line 176 "dbInterface.cpp"
# line 176 "dbInterface.cpp"
}
# line 176 "dbInterface.cpp"
# line 176 "dbInterface.cpp"
_sql->retcode = ct_fetch(_sql->conn.command, CS_UNUSED,
# line 176 "dbInterface.cpp"
CS_UNUSED, CS_UNUSED, &_sql->rowsread);
# line 176 "dbInterface.cpp"
_sql->hastate = (_sql->retcode == CS_RET_HAFAILOVER);
# line 176 "dbInterface.cpp"
if ((_sql->retcode == CS_END_DATA)||(_sql->retcode ==
# line 176 "dbInterface.cpp"
CS_FAIL)||
# line 176 "dbInterface.cpp"
(_sql->retcode == CS_SCROLL_CURSOR_ENDS))
# line 176 "dbInterface.cpp"
{
# line 176 "dbInterface.cpp"
_sql->retcode = _sqlResults(_sql);
# line 176 "dbInterface.cpp"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -