sqlite-sync / SQLite-sync.com

AMPLI-SYNC is a framework for synchronizing data between a Sqlite database and an MS SQL/MySQL/Oracle/PostgreSQL database. With this framework your application can work completely offline (Airplane Mode), then perform an automated Bidirectional Synchronization when an internet connection becomes available.
https://ampliapps.com/sqlite-sync/
BSD 3-Clause "New" or "Revised" License
328 stars 82 forks source link

Empty values are inserted as null strings #34

Open fazendeiro opened 4 years ago

fazendeiro commented 4 years ago

Hello,

I'm developing an Android app synced with a MSSQL Server. After adding tables and syncing, i'm encountering an issue because there is no null values in my SQLite database, all has been inserted as null strings. It happens with TEXT columns, but also INT, that causes conversion errors in my app.

Is there a setting to change that?

IchoTolot commented 4 years ago

As far as I know changeable settings are only in the .conf file

fazendeiro commented 4 years ago

Thank you, I haven't found anything that changes that. Do you think this is normal behavior?

IchoTolot commented 4 years ago

I don't think so. IMHO all database values will be converted to string because they are transmitted as xml. But they should be converted back before they are written into the database. Is the Sqlite datatype of the column really "text"? Personally I would test this with a mysql database, because in my opinion the support is best here. I run in some trouble too when I use postgres. And...most important. Always use the latest version from https://projects.ampliapps.com/projects/ampli-sync/files

fazendeiro commented 4 years ago

I use 3.2.15 so I don't think that's the issue. Yes it is realy text, or varchar columns. The problem is that happens on integer columns. I changed from Room library to SQLiteOpenHelper wich is more configurable.

Thank you for answers !