You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.3 KiB
C++
31 lines
1.3 KiB
C++
#pragma once
|
|
#include <QMap>
|
|
#include "Defines.h"
|
|
#include "mGuiDataLoad_global.h"
|
|
|
|
//读取Access数据
|
|
class M_GUI_DATA_LOAD_EXPORT iLoadAccess
|
|
{
|
|
public:
|
|
iLoadAccess();
|
|
//获得数据从数据库中
|
|
static bool getDataFromAccess(QString sFile, QStringList& listField, QMap<QString, VecVariant>& mapData);
|
|
//获得某一个表的数据字段
|
|
static bool getDataByTable(QString sTable, QStringList& listFieldName, VVecVariant& vvec);
|
|
|
|
//区块表组织
|
|
static bool parseQkTable(VVecVariant vvecSrc, QMap<QString, VecVariant>& mapQK,
|
|
QStringList listSrc, QStringList& listField);
|
|
//组织两个表的数据合起来(以井为map的关键字)
|
|
static bool combineTableData(VVecVariant vvecTableSrc,
|
|
QMap<QString, VecVariant> mapQK,
|
|
QStringList listSrc, QStringList listFieldQK,
|
|
QStringList& listField,
|
|
QMap<QString, VecVariant>& mapData);
|
|
//数据的时候需要的到表名及每个表的数据
|
|
static bool getDataFromAccess(QString sFile, QMap<QString, QStringList>& mapTable,
|
|
QMap<QString, VVecVariant>& mapData);
|
|
//跟新数据
|
|
static bool updateAccess(QString sFile, QString sTable, QPair<QString, QVariant> pairKey, QMap<QString, QVariant> mapUpdateData);
|
|
};
|