On Sun, May 6, 2012 at 2:21 PM, Norbert Sendetzky
<[email protected]>wrote:

> Hi all
>
> > Yes, that is what is expected, but in the case of SQLite, the column
> > type changes to  SQLITE_NULL for nulls and that is a problem in
> > squeakdbx now. I think column datatype should not be stored in the
> > resultset in the case of sqlite. Other databases don't behave this
> > way (as far as I can remember), so, overriding moveNext for sqlite
> > would probably be fine.
>
> I've enhanced the way to find out what is the data type of the column
> even if SQLite3 returns SQLITE_NULL as column type when one row contains
> a value of NULL.
>
> SQLite3 provides a function sqlite3_table_column_metadata() which
> returns the original column information when SQLite3 is compiled with
> the marco SQLITE_ENABLE_COLUMN_METADATA (which should usually be the case).
>
> The enhancement is available since SVN rev. 362
>
>
Norbert, I tried but still couldn't make it work.
What I am doing as a test is this:

CREATE TABLE student(
       id INTEGER,
       name_surname CHARACTER VARYING(30),
       username VARCHAR(10),
        pass VARCHAR(10),
        mail VARCHAR(50),
        regular BOOLEAN,
       age SMALLINT,
       average_grade DECIMAL(9,3),
       sex CHARACTER(3),
       description CHARACTER VARYING(200),
       starting_hour TIME,
       sign_up_date TIMESTAMP,
       born_date DATE,
       nullable_field VARCHAR(64) NULL,
      CONSTRAINT pk_students_id PRIMARY KEY (id)
    )

INSERT INTO student (id, name_surname, nullable_field) VALUES (88,
''Mariano Squeak'', null) .
INSERT INTO student (id, name_surname, nullable_field) VALUES (89,
''Mariano Squeak'', ''riptobe'' )

SELECT id, nullable_field FROM student

And then I get all the rows of the resultset. But still, for "riptobe" we
have an 16rFF 255 type :(

I even recompiled/installed Sqlite3 with the option
SQLITE_ENABLE_COLUMN_METADATA as suggested here:
http://source.online.free.fr/Linux_HowToCompileSQLite.html

Any idea?

thanks


>
> Norbert
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> libopendbx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
> http://www.linuxnetworks.de/doc/index.php/OpenDBX
>



-- 
Mariano
http://marianopeck.wordpress.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libopendbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to