Commit 0d89d7c8 authored by gmantele's avatar gmantele
Browse files

[TAP] Deal with the DB type 'BOOLEAN' while uploading boolean values in the...

[TAP] Deal with the DB type 'BOOLEAN' while uploading boolean values in the database => convert the boolean in a short value (1 or 0).
parent fb4d9f33
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1667,6 +1667,9 @@ public class JDBCConnection implements DBConnection {
								throw new DataReadException("Incorrect STC-S syntax for the geometrical value \"" + val + "\"!", e);
							}
						}
						/* BOOLEAN CASE (more generally, type incompatibility) */
						else if (val != null && cols[c - 1].getDatatype().type == DBDatatype.SMALLINT && val instanceof Boolean)
							val = ((Boolean)val) ? (short)1 : (short)0;
					}
					stmt.setObject(c++, val);
				}