Re: SQLite

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Petite Abeille

    Re: SQLite


    On Oct 3, 2008, at 2:33 PM, Matthias Huening wrote:
    This seems not to work with sqlite3.
    Before going any further... make sure that SQLite's count_change is
    enabled:

    PRAGMA count_changes
    PRAGMA count_changes = 0 | 1

    "Query or change the count-changes flag. Normally, when the count-
    changes flag is not set, INSERT, UPDATE and DELETE statements return
    no data. When count-changes is set, each of these commands returns a
    single row of data consisting of one integer value - the number of
    rows inserted, modified or deleted by the command. "



    Cheers,

    --
    PA.

  • Matthias Huening

    #2
    Re: SQLite

    Thanks!
    cursor.rowcount does exactly what I need.
    Before going any further... make sure that SQLite's count_change is
    enabled:
    >
    PRAGMA count_changes
    PRAGMA count_changes = 0 | 1
    >
    "Query or change the count-changes flag. Normally, when the
    count-changes flag is not set, INSERT, UPDATE and DELETE statements
    return no data. When count-changes is set, each of these commands
    returns a single row of data consisting of one integer value - the
    number of rows inserted, modified or deleted by the command. "
    >
    Looks like this is not really necessary. My database hat count_changes
    disabled, but rowcount seems to work anyway. Are there any pitfalls?

    Matthias

    Comment

    Working...