-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wenton Thomas wrote: > Now I wonder what's the max length of the error message? > Is it possiable that the length exceeds 255?
In theory the message could be up to 2GB in length (eg if generated by a VFS). In practise it is likely to be about a sentence long. However your question indicates some other underlying issue. If you are copying the message into a buffer then you should do so safely. If your buffer is limited in size then you'll have to truncate the message. If the character limit is due to displaying the message to a user, then it doesn't really matter either since the message will be meaningless technobabble anyway. In general you cannot recover from a corrupt database. (To do so would require redundant copies of information in the database so that you could pick information from a "good" copy on error.) Your efforts are best spent not having a corrupt database in the first place :-) BTW if you do want to corrupt a database, here are some methods: http://www.sqlite.org/lockingv3.html (section 6) http://www.sqlite.org/pragma.html#modify (eg journal=memory, synchronous=off) Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkpIbxgACgkQmOOfHg372QQDNQCdHM7jn7KTZE4eJgPuWKR7Ofi+ yxwAn2/8EaJ0HTfhyf/VFT1xvxgsrYy7 =d9Sh -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users