On 18.01.2011 09:03, Edwin Yip wrote: > FDb.StartTransaction; > Stmt := FDb.Prepare('update Docs set Content=? where DocId=?'); > > Stmt.Bind_ZeroBlob(1, srcFile.Size); > > Stmt.Bind_int(2, aDoc.DocId); > > Stmt.Step; > //so far so good, so I think the row id 0 exists, whereas the > error msg says 'no such rowid'. UPDATE statements do not return any results. Also, if no row matches your WHERE clause, the update will still finish normally and will not throw any errors. So your code above does not allow you to conclude that a particular row exists. To check if a table contains a particular RowID, execute a query like SELECT 1 FROM table WHERE RowID = ? The row exists if Stmt.Step returns SQLITE_ROW. Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa