CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQEdit DataLink fires SetText

by paubc » 27 Jun 2017 14:50

Hi,

I'm using DXE6, IW v14.1.6 and IWCG v3.0.0.115.

Regards.
paubc
 
Posts: 14
Joined: 16 Feb 2017 16:48

by assapan » 27 Jun 2017 17:33

Hi,
if you debug the application isn't the exception fired when the clientdatatset.open ?
don't you have same problem if you disconnect the datasetprovider ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 27 Jun 2017 17:46

WHy don't you indicate to clientdataset the fields type ? if there is no field type the variant "value" is not defined ! ?
Can you try this ?

ClientDataSet.FieldDefs.Add('SOME_TEXT',TFieldType.ftString,60);
ClientDataSet.FieldDefs.Add('PERCENT_DONE',TFieldType.ftFloat);
ClientDataSet.CreateDataSet;
ClientDataSet.LogChanges := False;
ClientDataSet.Append;
ClientDataSet.FieldByName('SOME_TEXT').Value := 'This is for some text';
ClientDataSet.FieldByName('PERCENT_DONE').AsFloat := 75.45;
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by paubc » 27 Jun 2017 22:35

assapan wrote:Hi,
if you debug the application isn't the exception fired when the clientdatatset.open ?
don't you have same problem if you disconnect the datasetprovider ?


The ClientDataSet is opened here ...

procedure TIWFRMTest_DisplayFormat.DoCDS;
begin
ClientDataSet.CreateDataSet;

... with no exception at all.

The exception is fired when CGDevTools framework (I don't know why) assign the value to the DataSet.

Regards.
paubc
 
Posts: 14
Joined: 16 Feb 2017 16:48

by paubc » 27 Jun 2017 22:42

assapan wrote:WHy don't you indicate to clientdataset the fields type ? if there is no field type the variant "value" is not defined ! ?
Can you try this ?

ClientDataSet.FieldDefs.Add('SOME_TEXT',TFieldType.ftString,60);
ClientDataSet.FieldDefs.Add('PERCENT_DONE',TFieldType.ftFloat);
ClientDataSet.CreateDataSet;
ClientDataSet.LogChanges := False;
ClientDataSet.Append;
ClientDataSet.FieldByName('SOME_TEXT').Value := 'This is for some text';
ClientDataSet.FieldByName('PERCENT_DONE').AsFloat := 75.45;


Form the VCL implementation:
- in TField class:
property Value: Variant read GetAsVariant write SetAsVariant;

procedure TField.SetAsVariant(const Value: Variant);
begin
if VarIsNull(Value) then
Clear
else
try
SetVarValue(Value);
except
on EVariantError do DatabaseErrorFmt(SFieldValueError, [DisplayName]);
end;
end;

- in TFloatField class:
procedure SetVarValue(const Value: Variant); override;

procedure TFloatField.SetVarValue(const Value: Variant);
begin
SetAsFloat(Value);
end;


So, as you can see, what you say is not correct.
This line ...
ClientDataSet.FieldByName('PERCENT_DONE').Value := 75.45;
... do the same as this one ...
ClientDataSet.FieldByName('PERCENT_DONE').AsFloat := 75.45;

Regards.
paubc
 
Posts: 14
Joined: 16 Feb 2017 16:48

by assapan » 28 Jun 2017 07:55

Hi, what warns me is the exception type EDatabaseError, i tried your source on a server with english settings decimal separator ='.' and french settings decimal separtor =',' and everything works !!!!

can you compile and post the exe so i could test here ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 28 Jun 2017 09:41

Hi,

I'm using DXE6, IW v14.1.6 and IWCG v3.0.0.115.


You should try the recent versions (3.5.x or 4.x.x).

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by paubc » 30 Jun 2017 22:54

Hi,

I installed IW 14.1.13 and CGDevTools 3.5.0.231
Now it seems to be working ok.

Regards
paubc
 
Posts: 14
Joined: 16 Feb 2017 16:48

Previous

Return to JQEdit

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.