Android Question Saving Email Body to SQLite

Discussion in 'Android Questions' started by Krammig, Jan 28, 2018.

  1. Krammig

    Krammig Member Licensed User

    Pulling down emails from a mail server and saving them to a local SQLite DB using B4A.

    Currently we are converting the data to Base64 and then saving it to a nvarchar however it seems every so often some special character is messing things up - crashes the routine.

    Most emails are written to and read from the database, but as I mentioned every so often there seems to be something kicking up.

    Is there a better more stable way to save the email body to a SQLite database than first converting to Base64 and what would be the correct data type for the column.

    thanks
     
  2. bokinet

    bokinet Member Licensed User

    Maybe it's funny but can you try to encrypt it or even use some compression which should be byte safe and then do base64 and store to db.
    Also, code page which is used for e-mails body you should check as well and do byte safe encoding/decoding too.
     
  3. Krammig

    Krammig Member Licensed User

    Thanks will give that a try
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice