sqlite3_executeΒΆ
sqlite3_execute executes an SQL command.
- result = sqlite3_execute(db, ssSQL)
Return Value
result is an empty string or a string matrix. If an error occurs, an exception is created.
Parameters
- db
db is a handle returned by sqlite3_open.
- ssSQL
ssSQL is an SQL string (see example). The SQL string syntax is specified in the article SQLite (SQL).
Example
The following example creates an SQLite database table.
db = sqlite3_open("c:/addresses.db");
sqlite3_execute(db, "create table Addresses(FirstName varchar(100), LastName varchar(100), EMail varchar(100));");
sqlite3_execute(db, "insert into Addresses values('Peter', 'Mueller', 'peter.mueller@axz.de');");
sqlite3_close(db);
This example returns all address table records:
db = sqlite3_open("c:/addresses.db");
smAddresses = sqlite3_execute(db, "select * from Addresses;");
sqlite3_close(db);
print smAddresses + "|";
History
Version |
Description |
---|---|
5.5.0 |
New. |
See also
id-507022