jeudi 10 décembre 2015

Node.js and sqlite, SQLITE_RANGE: bind or column index out of range

I know it sound stupid and the answer is probably right in front of me, but I can't figure out why I get this SQLITE_RANGE error, since my object looks like it has every properties needed.

    console.log "values " ,  values

    #   Recording in db
    console.assert values.login?
    console.assert values.password_sha?     
    console.assert values.email?
    console.assert values.token?
    values.password = null
    @db.run "INSERT INTO user VALUES (NULL, $login, $password_sha, $email, $token)", values, (err) ->
        console.error err if err?

Here is the output of my server

values  { login: 'ostream',
  email: 'ijw',
  password: 'justine',
  token: 'acppn99ngiafw29',
  password_sha: 'b1820c2ec34175954bdaa42038b48886b4c83f8d53f88b5315c415898855e4f8' }

{ [Error: SQLITE_RANGE: bind or column index out of range] errno: 25, code: 'SQLITE_RANGE' }

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire