Bram Kuijvenhoven wrote:
Or, Arí has an older odbcconn, where SQL_TIMESTAMP was mapped to ftTimeStamp, which in turn has no FieldClass associated with it, giving, on closer inspection, the same error -- 'Unknown field type'!.
In a private mail, Arí told me he has Lazarus 0.9.12. Looking at the fpc source distributed with this version of Lazarus, I found that the odbcconn.pas shipped predates revision 1980, where the mentioned problem (SQL_TYPE_TIMESTAMP -> ftTimeStamp -> DefaultFieldClass: nil, as no TTimeStamp TField descendent exists), was fixed. It is no more than logic the DB2 ODBC driver maps TIMESTAMP to the ODBC data type SQL_TYPE_TIMESTAMP, hence it is even 99.99% sure that this causes Arí's problem. (I can't find documentation on the driver, so I have to guess; even worse: I don't know which ODBC driver he uses, and there are many for DB2...) So Arí: you will need a newer FPC or Lazarus+FPC. There exist daily Lazarus snapshots (I see these are directly linked from the menu of the Laz website now; good work!), or you could put some time in figuring out how to get Lazarus from SVN. You could also try a snapshot of FPC only, but then you'll need to - point Lazarus to the updated FPC - point Lazarus to the source of the updated FPC (this recommended, but optional) - rebuild Lazarus with the updated FPC (if you want to use the LCL [the Lazarus Component Library], and I suppose definitely want that :) ) You could also try something like 'option 2' mentioned in my other reply (i.e. local copying the patched odbcconn), but this might not work the Lazarus ODBC component, as you'd might need to copy half the LCL units. (Note: I might be wrong here, please correct me if so!) Hint: the ViewCVS web interface is very useful, as it gives an intuitive and powerful interface to the SVN repositories. You can find it at http://www.freepascal.org/cgi-bin/viewcvs.cgi/. The odbcconn unit is located at e.g. http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/fcl/db/sqldb/odbc/. You can see the history of files, view diffs and download any revision you want. Note: the patch I sent Saturday is not yet in SVN, but the latest revision in SVN should already fix your problem. BTW: is there an easier way to see which FPC revision is shipped with a Lazarus than just looking at the sources in fpcsrc directory of the Lazarus distribution? Regards, Bram _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
