Robert. M. Manning wrote:
> I'm trying to add support for SQLiteJDBC to SQuirreL SQL Client and I
> came across some odd behavior. If I declare a table with a single
> integer column, select from it (no records - just an emtpy ResultSet)
> and look at the ResultSet's MetaData, the column type is returned as
> zero (java.sql.Types.NULL). However when I insert a record into it,
> and do another select, the column type is reported to be integer
> (java.sql.Types.INTEGER). Shouldn't the column type be consistent
> regardless of whether or not the table has data? My test below yields
> the following output:
>
> getColumnType: 0
> getColumnName: integer
> getColumnType: 4
> getColumnName: integer
This is the nature of SQLite, it is not strictly typed. To quote:
In SQLite version 3, the type of a value is associated with the
value itself, not with the column or variable in which the value
is stored. (This is sometimes called manifest typing.)
http://sqlite.org/datatype3.html
d.
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---