FYI, I found a solution but I'm not sure if it will work - close the DB connection before the system is entering sleep mode, and reopen it after the system is resumed. Ralf must have his insightful comments. :) ref: http://www.mail-archive.com/sqlite-users@xxxxxxxxxx/msg55626.html On Fri, Jul 15, 2011 at 11:03 AM, Edwin Yip <edwin.yip@xxxxxxxxxxxxxxxxxx>wrote: > Hi Ralf, > > Will the windows hibernation (sleep mode) cause DISQLITE malfunction? > Several users of my app that uses DISQLITE have reported the following error > message and they say the error happens only after the computer is come back > from the hibernation mode, any workaround? > > SQLite Error 10 - disk I/O error > > And the code that caused this error: > > //---------------------------------------------------------------------------------------- > var > stmt: TDiSqlite3Statement; > const > conSql = > 'select group_concat(TagName,?) from Tags inner join DocTags on ' > + ' Tags.TagId=DocTags.Tagid where DocId=? group by DocId'; > begin > Result := ''; > if not FDb.Connected then > Exit; > > stmt := FDb.Prepare16(conSql); > try > stmt.Bind_Str16(1, aSeparator); > stmt.Bind_int(2, aDocId); > if stmt.Step = SQLITE_ROW then > Result := stmt.Column_str16(0); > finally > stmt.Free; > end; > end; > > //---------------------------------------------------------------------------------------- > > > -- > Best Regards, > Edwin Yip > > Mind Mapping is as Effortless as Typing > http://www.InnovationGear.com > -- Best Regards, Edwin Yip Mind Mapping is as Effortless as Typing http://www.InnovationGear.com