コード例 #1
0
ファイル: BindParams.hpp プロジェクト: frodohao/SmartDB1.03
	inline int BindParams(sqlite3_stmt *statement, int current, T&&first, Args&&... args)
	{
		int code = BindValue(statement, current, first);
		if (code != SQLITE_OK)
			return code;

		code = BindParams(statement, current + 1, std::forward<Args>(args)...);

		return code;
	}
コード例 #2
0
ファイル: SqlCommand.cpp プロジェクト: Metazion/MetaDb
bool SqlCommand::Bind(SqlFieldParam* fieldParams, int number) {
    int paramCount = mysql_stmt_param_count(m_stmt);
    if (paramCount != number) {
        m_sqlConnection.SetLastError("SqlCommand Bind Error << param number should be[%d]"
            ", but in[%d]", paramCount, number);
        return false;
    }

    m_fieldParams = fieldParams;
    m_fieldNumber = number;
    return BindParams();
}