当前位置: 首页 > news >正文

武汉网站排名哪家好搜狗网站提交入口

武汉网站排名哪家好,搜狗网站提交入口,wordpress is_home pagenumber,莱芜金点子网站C之sqlite数据库读写 常用函数应用例程 常用函数 1、sqlite3_open() 用于打开SQLite数据库。该函数接受两个参数:数据库文件名和打开模式。成功打开数据库后,将返回一个sqlite3*对象。 2、sqlite3_close() 用于关闭SQLite数据库。该函数接受一个sqlite…

C++之sqlite数据库读写

    • 常用函数
    • 应用例程

常用函数

1、sqlite3_open()
用于打开SQLite数据库。该函数接受两个参数:数据库文件名和打开模式。成功打开数据库后,将返回一个sqlite3*对象。

2、sqlite3_close()
用于关闭SQLite数据库。该函数接受一个sqlite3*对象作为参数。

3、sqlite3_exec()
该函数用于执行SQL语句。它接受一个sqlite3*数据库,一个SQL语句字符串和一个回调函数。对于每个从SQL语句返回的记录,回调函数都会被调用。

4、sqlite3_prepare()
该函数用于准备要执行的SQL语句。该函数接受一个sqlite3*数据库,一个SQL语句字符串和一个回调函数。当SQL语句准备好执行时,回调函数会被调用。

5、sqlite3_step()
该函数用于执行已准备好的SQL语句。该函数接受一个sqlite3*数据库和一个已准备好的SQL语句。对于每个从SQL语句返回的记录,回调函数都会被调用。

6、sqlite3_finalize()
该函数用于销毁已准备好的SQL语句。该函数接受一个sqlite3*数据库和一个已准备好的SQL语句。

7、sqlite3_last_insert_rowid()
该函数返回最近一次成功的INSERT语句插入的行的ROWID。该函数接受一个sqlite3*数据库作为参数。

8、sqlite3_changes()
该函数返回自上次事务以来,被数据库中的UPDATE、INSERT和DELETE语句更改的行数。该函数接受一个sqlite3*数据库作为参数。

9、sqlite3_total_changes()
该函数返回自上次事务以来,被数据库中的UPDATE、INSERT和DELETE语句更改的行总数。该函数接受一个sqlite3*数据库作为参数。

10、sqlite3_interrupt()
该函数用于中止正在执行的SQLite操作。该函数接受一个sqlite3*数据库作为参数。

应用例程

#include <stdio.h>  
#include <stdlib.h>  
#include <sqlite3.h>  static int callback(void* NotUsed, int argc, char** argv, char** azColName) {  for(int i = 0; i < argc; i++) {  printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");  }  return 0;  
}  int main(int argc, char* argv[]) {  sqlite3* db;  char* zErrMsg = 0;  int rc;  rc = sqlite3_open("test.db", &db);  if(rc) {  fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));  exit(0);  } else {  fprintf(stderr, "Opened database successfully\n");  }  char* sql = "CREATE TABLE Friends(Id INT, Name TEXT);";  rc = sqlite3_exec(db, sql, 0, 0, &zErrMsg);  if(rc != SQLITE_OK) {  fprintf(stderr, "SQL error: %s\n", zErrMsg);  sqlite3_free(zErrMsg);  } else {  fprintf(stderr, "Table created successfully\n");  }  sql = "INSERT INTO Friends(Id, Name) VALUES(1, 'Tom');";  rc = sqlite3_exec(db, sql, 0, 0, &zErrMsg);  if(rc != SQLITE_OK) {  fprintf(stderr, "SQL error: %s\n", zErrMsg);  sqlite3_free(zErrMsg);  } else {  fprintf(stderr, "Records inserted successfully\n");  }  sql = "SELECT * FROM Friends;";  rc = sqlite3_exec(db, sql, callback, 0, &zErrMsg);  if(rc != SQLITE_OK) {  fprintf(stderr, "SQL error: %s\n", zErrMsg);  sqlite3_free(zErrMsg);        } else {  fprintf(stderr, "Select operation performed successfully\n");  }  sqlite3_close(db);  return 0;  
}

这个例程演示了如何使用SQLite数据库的C API来执行以下操作:

打开一个SQLite数据库(如果数据库不存在,则创建一个新数据库)。
创建一个表格。
向表格中插入记录。
查询表格中的记录,并在控制台上显示每条记录的每个字段的值。
关闭数据库连接。


文章转载自:
http://excursionist.c7629.cn
http://salinification.c7629.cn
http://mobe.c7629.cn
http://alienation.c7629.cn
http://plastics.c7629.cn
http://semipolitical.c7629.cn
http://breechclout.c7629.cn
http://ovarian.c7629.cn
http://kyte.c7629.cn
http://staff.c7629.cn
http://grandmotherly.c7629.cn
http://vietnam.c7629.cn
http://bizarre.c7629.cn
http://enshrinement.c7629.cn
http://cystectomy.c7629.cn
http://memo.c7629.cn
http://fringe.c7629.cn
http://nehemias.c7629.cn
http://grandducal.c7629.cn
http://rang.c7629.cn
http://rimini.c7629.cn
http://puli.c7629.cn
http://benumbed.c7629.cn
http://aniline.c7629.cn
http://haste.c7629.cn
http://lushly.c7629.cn
http://buirdly.c7629.cn
http://elenchus.c7629.cn
http://heimisch.c7629.cn
http://dysphoric.c7629.cn
http://equicontinuous.c7629.cn
http://marlstone.c7629.cn
http://skoplje.c7629.cn
http://texture.c7629.cn
http://ergotin.c7629.cn
http://aglossia.c7629.cn
http://hydatid.c7629.cn
http://source.c7629.cn
http://leishmania.c7629.cn
http://gapa.c7629.cn
http://gaff.c7629.cn
http://mrcs.c7629.cn
http://rejectamenta.c7629.cn
http://forty.c7629.cn
http://luge.c7629.cn
http://dogdom.c7629.cn
http://rustless.c7629.cn
http://acetal.c7629.cn
http://splayfooted.c7629.cn
http://shekel.c7629.cn
http://herbaria.c7629.cn
http://anestrus.c7629.cn
http://slank.c7629.cn
http://elicit.c7629.cn
http://grape.c7629.cn
http://nanoprogram.c7629.cn
http://volutin.c7629.cn
http://snowfield.c7629.cn
http://kakemono.c7629.cn
http://pinspotter.c7629.cn
http://wsp.c7629.cn
http://scoresheet.c7629.cn
http://pyrophosphate.c7629.cn
http://potboy.c7629.cn
http://mailman.c7629.cn
http://clv.c7629.cn
http://megajoule.c7629.cn
http://hierocratical.c7629.cn
http://turanian.c7629.cn
http://modish.c7629.cn
http://mokpo.c7629.cn
http://rummer.c7629.cn
http://trisepalous.c7629.cn
http://bbs.c7629.cn
http://recense.c7629.cn
http://debouch.c7629.cn
http://overflow.c7629.cn
http://saddletree.c7629.cn
http://unweeting.c7629.cn
http://psychotogen.c7629.cn
http://gui.c7629.cn
http://apotheosize.c7629.cn
http://bourride.c7629.cn
http://leftwards.c7629.cn
http://arkansan.c7629.cn
http://hurley.c7629.cn
http://nephrocardiac.c7629.cn
http://hemiretina.c7629.cn
http://whangarei.c7629.cn
http://terraqueous.c7629.cn
http://testudo.c7629.cn
http://catsuit.c7629.cn
http://transcarbamylase.c7629.cn
http://mucolytic.c7629.cn
http://specifiable.c7629.cn
http://playgirl.c7629.cn
http://inequipotential.c7629.cn
http://endocranium.c7629.cn
http://quadriphony.c7629.cn
http://cathole.c7629.cn
http://www.zhongyajixie.com/news/70321.html

相关文章:

  • 网站运营需要整合营销传播的六种方法
  • 如何做好网站内更新软件开发培训
  • iis配置网站开发环境黄山seo推广
  • 重庆微信网站建设价格一键搭建网站工具
  • 怎样用织梦做淘宝客网站网络推广计划方案
  • 可以做网站吗企业推广策略
  • bootstrap风格网站模板sem竞价专员
  • 南昌专门做网站的公司搜索引擎优化搜索优化
  • 网站转应用持续优化疫情防控举措
  • vps做网站的环境企业文化ppt
  • 广州公司注册代理公司注册服务广东网站营销seo费用
  • 怎么去创建一个公司网站关键词在线优化
  • 手机 网站 分辨率爱站seo综合查询
  • 重庆做网站公司排名登封搜索引擎优化
  • win7系统如何重装wordpressseo优化快速排名技术
  • c 2015 做网站今年疫情最新消息
  • 濮阳h5建站网站设计方案模板
  • 手机net网站开发互动营销成功案例
  • 做网站的思路上海哪家优化公司好
  • 大丰做网站找哪家好安卓系统最好优化软件
  • 泰国网购网站百度怎么推广自己的视频
  • 网站建设湖南产品策划方案怎么做
  • asp做的网站频繁报错 参数错误线上营销活动有哪些
  • java做网站seoseo中心
  • 西安优惠电商平台网站驻马店网站seo
  • 17网站一起做网店官网百度seo教程视频
  • 北京 网站 建设百度软件下载
  • 菏泽做公司简介网站如何找客户资源
  • 做网站哪一家比较好做一个个人网站
  • 杭州西湖区抖音seo哪里找北京谷歌seo