Ticket #180 (closed defect: fixed)
Sqlite driver doesn't handle blank numeric entries
| Reported by: | ferrouswheel | Owned by: | grass-dev@… |
|---|---|---|---|
| Priority: | major | Milestone: | 6.4.0 |
| Component: | Default | Version: | 6.3.0 |
| Keywords: | sqlite db | Cc: | |
| Platform: | CPU: |
Description
Platform: GNU/Linux/x86_64 grass obtained from: SVN grass binary for platform: Compiled from Sources GRASS Version: grass63_release
The Sqlite driver doesn't seem to handle sqlite NUMERIC types being blank.
When the the field is blank, the following is output (here it is col 8 that is NUMERIC):
D3/3: col 0, litetype 3, sqltype 13: val = 'Cortaderia selloana' D3/3: col 1, litetype 3, sqltype 13: val = 'Pukepuke Lagoon C.A.' D3/3: col 2, litetype 3, sqltype 13: val = 'Nicholls, V.J. and Singers, N.J.D.' D3/3: col 3, litetype 3, sqltype 3: val = '1997 ' D3/3: col 4, litetype 3, sqltype 13: val = 'Pukepuke Lagoon C.A.?' D3/3: col 5, litetype 1, sqltype 3: val = '2701900' D3/3: col 6, litetype 1, sqltype 3: val = '6093700' D3/3: col 7, litetype 3, sqltype 3: val = '' D3/3: col 8, litetype 3, sqltype 6: val = '' D3/3: sqlite fetched date: DBMI-SQLite driver error: Cannot scan date: D2/3: G__home home = /home/joel WARNING: Cannot fetch next record D3/3: db_close_database()
--
I don't understand why it's trying to scan a date? It works fine if there is a value such as 0.0021 in the column. I could replace all the blanks with 0.0, but I'd prefer to be able to keep them blank so that values don't get confused with missing data.
I'm using sqlite3 and the up to date grass63_release branch of svn.
Change History
Note: See
TracTickets for help on using
tickets.
