Generated from ./ with ROBODoc v4.99.3 on Thu Apr 21 09:56:18 2005

[Definitions] sqlite/defines

[top]

DESCRIPTION

 SQLITE_OK           0   /* Successful result 
 SQLITE_ERROR        1   /* SQL error or missing database 
 SQLITE_INTERNAL     2   /* An internal logic error in SQLite 
 SQLITE_PERM         3   /* Access permission denied 
 SQLITE_ABORT        4   /* Callback routine requested an abort 
 SQLITE_BUSY         5   /* The database file is locked 
 SQLITE_LOCKED       6   /* A table in the database is locked 
 SQLITE_NOMEM        7   /* A malloc() failed 
 SQLITE_READONLY     8   /* Attempt to write a readonly database 
 SQLITE_INTERRUPT    9   /* Operation terminated by sqlite_interrupt() 
 SQLITE_IOERR       10   /* Some kind of disk I/O error occurred 
 SQLITE_CORRUPT     11   /* The database disk image is malformed 
 SQLITE_NOTFOUND    12   /* (Internal Only) Table or record not found 
 SQLITE_FULL        13   /* Insertion failed because database is full 
 SQLITE_CANTOPEN    14   /* Unable to open the database file 
 SQLITE_PROTOCOL    15   /* Database lock protocol error 
 SQLITE_EMPTY       16   /* (Internal Only) Database table is empty 
 SQLITE_SCHEMA      17   /* The database schema changed 
 SQLITE_TOOBIG      18   /* Too much data for one row of a table 
 SQLITE_CONSTRAINT  19   /* Abort due to contraint violation 
 SQLITE_MISMATCH    20   /* Data type mismatch 
 SQLITE_MISUSE      21   /* Library used incorrectly 
 SQLITE_NOLFS       22   /* Uses OS features not supported on host 
 SQLITE_AUTH        23   /* Authorization denied 
 SQLITE_ROW         100  /* sqlite_step() has another row ready 
 SQLITE_DONE        101  /* sqlite_step() has finished executing 

 sqlite3 slang module error codes 
 SLANG_ARRAY_COPY_ERROR 901  /* module specific error code 

[Classes] sqlite3/sqlite3

[top]

NAME

    Slang Module for Sqlite version 3

CREATION DATE

    11/29/04 

AUTHOR

    Joe Robertson
    jmrobert5@mchsi.com

NOTES

    Originally started from template code.

HISTORY

    Second iteration of a module to interface the Sqlite 
    library.  This versionworks with the major revision
    to Sqlite, version 3.  Sqlite3 is much different from
    version 2.x.

[Functions] sqlite3/sqlite3_changes

[top][parent]

NAME

    sqlite3_changes  -get the number of changes caused
    by the last SQL action.

ARGUMENTS

    none

RETURN VALUE

    int, the number of changes in the db from the last SQL.

NOTES


[Functions] sqlite3/sqlite3_close

[top][parent]

NAME

    sqlite3_close  -close the database.

ARGUMENTS

    none

RETURN VALUE

    int, error code

NOTES


[Functions] sqlite3/sqlite3_errcode

[top][parent]

NAME

    sqlite3_errcode  -get the last error code.

ARGUMENTS

    none

RETURN VALUE

    int error code

NOTES


[Functions] sqlite3/sqlite3_errmsg

[top][parent]

NAME

    sqlite3_errmsg  -get the last error message.

ARGUMENTS

    none

RETURN VALUE

    string, error message

NOTES


[Functions] sqlite3/sqlite3_exec

[top][parent]

NAME

    sqlite3_exec  -execute a sql statement.

ARGUMENTS

    string, valid sqlite3 SQL string

OUTPUT

    changes to database

RETURN VALUE

    int, error code

SEE ALSO

    sqlite3_errcode, sqlite3_errmsg,   

NOTES


[Functions] sqlite3/sqlite3_get_cols

[top][parent]

NAME

    sqlite3_get_cols  -get the table column count.

ARGUMENTS

    none

RETURN VALUE

    int, the number of columns in the table.

NOTES


[Functions] sqlite3/sqlite3_get_rows

[top][parent]

NAME

    sqlite3_get_rows  -get the table row count.

ARGUMENTS

    none

RETURN VALUE

    int, the number of rows in the table.

NOTES


[Functions] sqlite3/sqlite3_get_table

[top][parent]

NAME

    sqlite3_get_table  -get a table of data results from a SQL query.

ARGUMENTS

    string, a sqlite3 SQL string statement.

RETURN VALUE

    an s-lang array is returned to the stack

EXAMPLE

    s-lang code

    [open db]
    % query the table
    variable data;
    data = sqlite3_get_table("SELECT * FROM test;");
    vmessage("data size=%d", length(data) );

SEE ALSO

    sqlite3_get_cols, sqlite3_get_rows

NOTES


[Functions] sqlite3/sqlite3_open

[top][parent]

NAME

    sqlite3_open  -open a sqlite3 database.

ARGUMENTS

    string, a sqlite3 SQL string statement.

RETURN VALUE

    int, error code.

SEE ALSO

    sqlite3_errmsg

NOTES

    open will return 0 on success 
    non-0 on fail
    call sqlite3_errmsg if fail 

[Functions] sqlite3/sqlite3_total_changes

[top][parent]

NAME

    sqlite3_total_changes  -get the number of changes since the db was open.

ARGUMENTS

    none

RETURN VALUE

    int, the number of changes in the db.

NOTES