Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TDBGrid displays Widememo for all SQLite text fields


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Mar 3, 2015 1:57 PM Last Post By: Michael Stokes
Michael Stokes

Posts: 5
Registered: 10/21/12
TDBGrid displays Widememo for all SQLite text fields  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2015 6:22 PM
I am just testing using Firedac to connect to an SQLite table.
However every text field from the table shows as WIDEMEMO in the columns of a TDBGrid or a TDBEdit.

I have tried setting the mapping below before connecting to the DB but it does not help.
with FDConnection1.FormatOptions do
begin
OwnMapRules := True;
with MapRules.Add do
begin
SourceDataType := dtMemo;
TargetDataType := dtAnsiString;
end;
end;

I also tried the one below but I got an error about not being able to convert.
with FDConnection1.FormatOptions do
begin
OwnMapRules := True;
with MapRules.Add do
begin
SourceDataType := dtWideMemo;
TargetDataType := dtAnsiString;
end;
end;

What am I doing wrong?
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: TDBGrid displays Widememo for all SQLite text fields  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2015 8:56 PM   in response to: Michael Stokes in response to: Michael Stokes
Michael Stokes

Posts: 5
Registered: 10/21/12
Re: TDBGrid displays Widememo for all SQLite text fields  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2015 11:01 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
http://docwiki.embarcadero.com/RADStudio/XE7/en/Using_SQLite_with_FireDAC#SQLite_Data_Types

--
With best regards,
Dmitry Arefiev / FireDAC Architect

Thanks Dmitry.
Once I added "Stringformat=Ansi" to the connection parameters, the maprules worked fine.

Edited by: Michael Stokes on Mar 3, 2015 1:54 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02