Sqlite3 when inserting data, return Sqlite_constraint

Source: Internet
Author: User
Tags sql error

Sqlite3 when inserting data, return Sqlite_constraint

The reason is that the name of the database table is purely numeric.

The reason for the big change is so weird that you can create a success when you create it. When inserting data, it fails because the table name is a pure number.

Attach the wrong Chinese parsing

#define SQLITE_OK 0/* success | Successful result *//* error code start */#define SQLITE_ERROR 1/* SQL error or lost database | SQL error or missing database */#define SQLITE_INTERNAL 2/* SQLITE Internal Logic Error | Internal logic Error in SQLite */#define SQLITE_PERM 3/* Deny access | Access Permission denied */#define SQLITE_ABORT 4/* Callback function request Cancel Operation | Callback routine requested an abort */#define SQLITE_BUSY 5/* Database file Locked | The database file is locked */#define SQLITE_LOCKED 6/* A table in the databases is locked | A table in the database is locked */#define SQLITE_NOMEM 7/* a malloc () function call failed | A malloc () failed */#define SQLITE_READONLY 8/* Try to write a read-only database | Attempt to write a readonly database */#define SQLITE_INTERRUPT 9/* operation is interrupted by the Sqlite3_interupt () function | Operation terminated by Sqlite3_interrupt () */#define SQLITE_IOERR 10/* Some disk I/O errors occur | Some kind of disk I/O error occurred */#define SQLITE_CORRUPT 11/* Database disk image Incorrect | The database disk image is MalforMed */#define SQLITE_NOTFOUND/* Sqlite3_file_control () unknown operand | Unknown opcode in Sqlite3_file_control () */#define SQLITE_FULL 13/* Because the database is full causes insert failure | Insertion failed because database is full */#define SQLITE_CANTOPEN 14/* Unable to open databases file | Unable to open the database file */#define SQLITE_PROTOCOL 15/* DB Lock Protocol error | Database Lock protocol error */#define SQLITE_EMPTY 16/* db Empty | Database is empty */#define SQLITE_SCHEMA 17/* Data structure changed | The database schema changed */#define SQLITE_TOOBIG 18/* string or binary data exceeds size limit | String or BLOB exceeds size limit */#define SQLITE_CONSTRAINT 19/* Canceled due to constraint violation | Abort due to constraint violation */#define SQLITE_MISMATCH 20/* Data Type mismatch | Data Type Mismatch */#define SQLITE_MISUSE 21/* Incorrect Library usage | Library used incorrectly */#define SQLITE_NOLFS 22/* uses features not supported by the operating system | Uses OS features not supported on Host */#define SQLITE_AUTH 23/* Authorization Failed | Authorization denied */#define Sqlite_format     24/* Additional database format Error | Auxiliary database Format Error */#define SQLITE_RANGE 25/* The second parameter passed to Sqlite3_bind () Out of range | 2nd parameter to sqlite3_bind out of range */#define SQLITE_NOTADB 26/* File opened is not a database file | File opened a database file */#define SQLITE_ROW/* SQLITE3_STEP () has produced a row result | Sqlite3_step () have another row ready */#define SQLITE_DONE 101/* SQLITE3_STEP () to complete the operation | Sqlite3_step () has finished executing *//* error code ends */girl does not Cry (qq:191035066) @2012-05-26 11:17:31 @ http://www.cnblogs.com/ Nbsofer


Sqlite3 when inserting data, return Sqlite_constraint

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.