Update a string (text
) which have 903 characters to the MS Access *.mdb:
All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.
By using the following code:
sql = "update Paragraphs set Data = ? where Id = ?"
args = [text, id]
cur.execute(sql, args)
conn.commit()
cur.close()
conn.close()
Then open the *.mdb by MS Access to browse the data, now there are 510 characters only:
All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no play makes Jack a dul
But if I don't use args at all:
sql = "update Paragraphs set Data = '%s' where Id = %d" % (text, id)
cur.execute(sql)
conn.commit()
cur.close()
conn.close()
All of the characters will be updated successfully.
Oh, I just found this bug is no more exist in the latest version of adodbapi 2.6.0.7.