Hi,
I create table with folowing SQL code:
CREATE TABLE IF NOT EXISTS domains(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
serverid INTEGER,
name VARCHAR,
startdate DATE,
enddate DATE,
ip INTEGER,
dkimpublic TEXT,
dkimprivate TEXT
);
CREATE INDEX IF NOT EXISTS idx_domains_server ON domains ( serverid );
Then right click on TLiteTable, Fields Editor -> Add all fields.
I don't know why but string fields created with wrong field type: name, dkimpublic, dkimprivate created as TWideMemoField !
Now then I try to open table I got an exception: Type mismatch for field 'dkimpublic', expecting: 'WideMemo' actual 'WideString'. But it's not right because fields was created automatically ! LiteDAC should suggest correct field types !
LiteDAC 2.7.23, RAD Studio XE7. LiteConnection.Options have Direct=true and UseUnicode=true.
It's bug in LiteDAC or my mistake ? Note: ZEOS DBO works well with this database.
Wrong field types and mismatch errors
Re: Wrong field types and mismatch errors
When UseUnicode=true, the fields Name, dkimpublic, dkimprivate must be mapped as TWideMemoField, that is correct behavior. The «Type mismatch» error may occur in case of applying DataTypeMapping in the TLiteTable component. In such case, please make sure the data mapping rules are correctly set in TLiteTable.