Problem: When I check a database field to the data type "DATE" out, that does not work under Lazarus:
-> if (uqTmp.Fields.DataType = ftDate) then
begin
.........
end;
=> Result: do nothing when the field data type is "DATE"
When I check the data type of each field, the value for "Date" is the same value as for "VARCHAR"
-> VarToStr(uqTmp.Fields.DataType => 16 (for DATE, DATETIME and VARCHAR)
Lazarus 1.26 / UniDac 6.02 / SQLite3
Re: Lazarus 1.26 / UniDac 6.02 / SQLite3
Hello,
We cannot reproduce the problem on the latest version of UniDAC 6.0.2, and SQLite3 3.8.5. Please specify the exact version of the SQLite3 library, and send a sample and the DB file reproducing the problem to alexp*devart*com.
We cannot reproduce the problem on the latest version of UniDAC 6.0.2, and SQLite3 3.8.5. Please specify the exact version of the SQLite3 library, and send a sample and the DB file reproducing the problem to alexp*devart*com.
Re: Lazarus 1.26 / UniDac 6.02 / SQLite3
Hello,
I have found the error:
I check the data fields of a copy of the original table. When I copy the table with the command
"CREATE TABLE IF NOT EXISTS t_copytbl AS SELECT * FROM t_orgtbl"
the DATE - data fields will copy as VARCHAR - data fields, and so the result was false.
The problem relates to SQLite, not UniDac.
I have found the error:
I check the data fields of a copy of the original table. When I copy the table with the command
"CREATE TABLE IF NOT EXISTS t_copytbl AS SELECT * FROM t_orgtbl"
the DATE - data fields will copy as VARCHAR - data fields, and so the result was false.
The problem relates to SQLite, not UniDac.
Re: Lazarus 1.26 / UniDac 6.02 / SQLite3
Hello,
Yes, this is behavior of SQLite and we can't affect it. However, you can use DataTypeMapping to map "NUM" field type to Date, for example
Yes, this is behavior of SQLite and we can't affect it. However, you can use DataTypeMapping to map "NUM" field type to Date, for example
Code: Select all
CREATE TABLE TEST(В DATE);
CREATE TABLE COPY_TEST AS SELECT * FROM TEST;
Code: Select all
UniTable1.TableName := 'COPY_TEST';
UniTable1.DataTypeMap.AddFieldNameRule('B', ftDate);
UniTable1.Open;