Page 1 of 1

working with Variant

Posted: Wed 27 Jul 2005 15:37
by bedla
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

Posted: Thu 28 Jul 2005 12:29
by Ikar
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.

Posted: Thu 28 Jul 2005 12:47
by bedla
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.

Posted: Thu 28 Jul 2005 13:03
by Ikar
Please send us (mydac*crlab*com) complete small sample without DevExpr to demonstrate problem.

PS: May be AField is TLargeInt field?

Posted: Thu 28 Jul 2005 13:32
by bedla
message was send

Posted: Thu 28 Jul 2005 15:43
by Guest
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

Posted: Fri 29 Jul 2005 11:04
by Ikar
id_parent is TLargeInt field. You cannot access these fields through Value. For details please see db.pas TLargeintField.SetVarValue

Posted: Fri 29 Jul 2005 11:04
by Ikar
> 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.