eletric_manage.rar (742 K) 下载次数:30 自學(xué)QT進(jìn)行qlite數(shù)據(jù)庫進(jìn)行數(shù)據(jù)存儲(chǔ),查詢
里面的函數(shù)做的差很多,粗略能用,簡單分享一下
//新建數(shù)據(jù)庫
void l_new_sqlite(QString connect_name,QString sqlite_type,QString sqlite_name,QString user_name,QString user_password);
//新建表
void l_new_table(QString table_name);
//打開數(shù)據(jù)庫
bool l_open_sqlite(QSqlDatabase db);
//關(guān)閉數(shù)據(jù)庫
void l_close_sqlite(QSqlDatabase db);
//插入數(shù)據(jù)
void l_insert_data(QString table_name,qint8 number,QString time,qreal first_floor_value,qreal sencond_floor_value,qreal third_floor_value,qreal forth_floor_value );
//查詢數(shù)據(jù)
void l_search_table(QString table_name,QString str);
//更新數(shù)據(jù),修改數(shù)據(jù)
void l_refesh_data(QString table_name);