XEdwin / mdb-sqlite

Automatically exported from code.google.com/p/mdb-sqlite
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Boolean or yes/no values not properly exported #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Export of a table with a yes/no column with various true/false values
2. Open sqlite db created by export
3. Observe all values of a yes/no field are exported as 0, regardless of
true or false value.

What is the expected output? What do you see instead?
Zero for false, and non zero constant for true.  Instead, all zeros

What version of the product are you using? On what operating system?
1.0 on windows XP

Please provide any additional information below.
If I remember correctly, the JDBC driver for sqlite doesn't properly assign
boolean constants with the setObject method.  

I added this simple workaround to the populateTable method:
                    case BOOLEAN:
                        boolVal = (Boolean) row.get(column.getName());
                        prep.setInt(i+1, boolVal ? -1 : 0);
                        break;

Original issue reported on code.google.com by dimaof...@gmail.com on 22 Jul 2008 at 2:54

GoogleCodeExporter commented 9 years ago

Original comment by landon.j.fuller@gmail.com on 23 Jul 2008 at 5:26

GoogleCodeExporter commented 9 years ago
Fix commited in r5, will need to prepare a 1.0.1 release.

Original comment by landon.j.fuller@gmail.com on 23 Jul 2008 at 10:31