SQLite Function Summary-04

Source: Internet
Author: User
Tags sqlite

1. Open the DatabaseintSqlite3_open (Const Char*filename,//the file path of the databaseSqlite3 **ppdb//DB Instance);2. Execute any SQL statementintsqlite3_exec (Sqlite3*,//an open DB instance    Const Char*sql,//SQL statements that need to be executed    int(*callback) (void*,int,Char**,Char**),//callback after the SQL statement has completed execution    void*,//the 1th parameter of a callback function    Char**errmsg//error Message);3. Check the legality of SQL statements (preparation before query)intSqlite3_prepare_v2 (Sqlite3*db,//DB Instance    Const Char*zsql,//SQL statements that need to be checked    intNbyte,//maximum byte length for SQL statementsSqlite3_stmt **ppstmt,//sqlite3_stmt instances to obtain database data    Const Char**pztail);4. Querying a row of dataintSqlite3_step (sqlite3_stmt*);//if a row of data is queried, the Sqlite_row is returned5. Use stmt to get the value of a field (the subscript of the field starts with 0)DoubleSqlite3_column_double (sqlite3_stmt*,intICOL);//floating point DataintSqlite3_column_int (sqlite3_stmt*,intICOL);//Integral type DataSqlite3_int64 Sqlite3_column_int64 (sqlite3_stmt*,intICOL);//long-integer dataConst void*sqlite3_column_blob (sqlite3_stmt*,intICOL);//Binary Text dataConstUnsignedChar*sqlite3_column_text (sqlite3_stmt*,intICOL);//String Data

SQLite Function Summary-04

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.