working with Variant

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bedla

working with Variant

Post by bedla » Wed 27 Jul 2005 15:37

Hi I am testing your product with my DevExpress VCLs (QuantumTree and Quanatum Grid). DevEx VCL setting internaly some data with TFiled->Value style ... and it looks that your MyDAC VCL doesnt work this way! Is there some solution for this (i think) BIG problem! Or am I doing someting wrong?

thas for your response

Bedla

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 28 Jul 2005 12:29

If DevExpress works through public methods you shouldn't have any problems.

> DevEx VCL setting internaly some data with TFiled->Value style ...
> and it looks that your MyDAC VCL doesnt work this way!

Try to reproduce this problem without using DevExpress VCL and send us a sample.

bedla

Post by bedla » Thu 28 Jul 2005 12:47

here is simple code

Code: Select all

 TcxTreeListDataNode *FNode = NULL;
 FNode = (TcxTreeListDataNode*)cxDBTreeList1->FocusedNode;

 if ( !FNode )
  return ;

 TDataSet *ADataSet = cxDBTreeList1->DataController->DataSet;

 ADataSet->DisableControls();
 __try
 {
  TField *AField = ADataSet->FindField(cxDBTreeList1->DataController->ParentField);
  if ( AField )
  {
   ADataSet->Edit();
   AField->Value = cxDBTreeList1->RootValue;
   ADataSet->Post();
  } // end if
 }
 __finally
 {
  ADataSet->EnableControls();
 } // end try/finally

 RecalculateAllTreeNodesOrderValues(cxDBTreeList1, cxDBTreeList1ID, cxDBTreeList1ORDER);
critical is :

Code: Select all

   AField->Value = cxDBTreeList1->RootValue;
when setting Value nothing happens, field value doesnt change!

i am using dev_express quantum tree to show hierarchy.

data table is

Code: Select all

create table category
(
   id                             bigint unsigned                not null AUTO_INCREMENT,
   id_parent                      bigint unsigned,
   category_name                  varchar(128),
   category_order                 int unsigned,
   active                         tinyint(1),
   primary key (id)
)
type = InnoDB;
dev_express treelist, while draging and droping tree nodes, internally sets Field throw Value property.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 28 Jul 2005 13:03

Please send us (mydac*crlab*com) complete small sample without DevExpr to demonstrate problem.

PS: May be AField is TLargeInt field?

bedla

Post by bedla » Thu 28 Jul 2005 13:32

message was send

Guest

Post by Guest » Thu 28 Jul 2005 15:43

it looks that problem is solved, i have changed all field types from BIG INT UNSIGNED to INT. :D everything works fine.

and i have final question: what are other restrictions? do you have some list or something like this.

other restriction i have found (finally in this forum) is that if i am using master/detail and key and foreign are BIG INT USIGNED or INT UNSIGNED than everythig is wrong :-)

have a nice day

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 29 Jul 2005 11:04

id_parent is TLargeInt field. You cannot access these fields through Value. For details please see db.pas TLargeintField.SetVarValue

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 29 Jul 2005 11:04

> what are other restrictions? do you have some list or something like this.

Not, we don't have such list for MyDAC. Usually if there is an error we fix it. But in this case the error concerns Borland VCL code and we cannot correct it.

Post Reply