Greetings! I have an application that writes a small SQLite database (well, several small databases), and an ActiveX control that reads them. One of the tables has three columns: a foreign key into another table, a value (which should be a double, but in the file I looked at, they're all integers for some unknown reason), and a timestamp. In early versions of these applications, the timestamp was written as a floating-point number containing a date in Julian form (number of days since 1/1/1601, I think it is). But with the latest SQLite library, the writing application suddenly started writing the dates in human-readable form ("2008-02-01 11:35:00"). I don't know why. Of course, this broke the reading control. But since I had cleverly written the reading application using classes that wrap the various field types, all I had to do was create a JulianDate class to wrap a date field. In that class, I'd check the column type I'm reading. If it's a double, I'd just return that, and if it's text, I'd convert it into a Julian date and return that. This worked just fine when I first wrote it a week or two ago. But now it's not working.
My code uses sqlite3_column_type to determine the column type of the date column. If it's SQLITE_FLOAT, then sqlite3_column_double() is used to retrieve the value. Otherwise, I assume the column is text and use sqlite3_column_text16() to retrieve the data. The problem I'm having is that my sqlite3_column_type() call is returning 1, which means the column is an integer. It isn't. When I open the file in SQLiteSpy, I see that all values in the date column are floating point numbers, as expected. And as I step through my code, since it tries to call sqlite3_column_text16(), I see that the data to the right of the decimal point is getting truncated when I read it. Can anyone tell me why SQLite suddenly thinks this column of floating-point data holds only integers? Thanks very much! Rob Richardson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users