Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Typo in Documentation:Sqlite help
#1
in the second example:

Quote: This is a simpler example. Just writes 1 row into an existing table.
Sqlite db2.Open(dbfile)
db1.Exec("INSERT INTO table1 VALUES ('value1','value2')")


Should db1 be db2? or should there be no db2 because based on prior example:

Quote: Creates or opens database with table 'table1', columns 'A' and 'B'. Writes 1 row.

Sqlite db1.Open(dbfile)
db1.Exec("BEGIN TRANSACTION") ;;don't save until END TRANSACTION. Makes faster whe calling Exec multiple times.
db1.Exec("CREATE TABLE IF NOT EXISTS table1 (A,B)")
str a("one") b("two") ;;data in variables
a.SqlEscape; b.SqlEscape ;;if there are ' characters, they must be replaced to ''
sql.format("INSERT INTO table1 VALUES ('%s','%s')" a b)
db1.Exec(sql)
db1.Exec("END TRANSACTION") ;;save now


Stuart
#2
db1 should be db2


Forum Jump:


Users browsing this thread: 1 Guest(s)