Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 12:04

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 12 Mar 2015, 02:30 
Offline

Joined: 12 Mar 2015, 01:34
Posts: 1
MemTableEh.DataDriver -> DataSetDriverEh.ProviderDataSet -> adoquery it is work

problem is : ClientDataset.ProviderName -> DatasetProvider.DataSet -> MemTableEh it is work too.
but why ClientDataset's TBCDField value is wrong

how i fix it ?

ehlib 6.3


DFM
Code:
object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 580
  ClientWidth = 968
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object DBGridEh1: TDBGridEh
    Left = 8
    Top = 8
    Width = 945
    Height = 241
    DataSource = DataSource1
    DynProps = <>
    IndicatorOptions = [gioShowRowIndicatorEh]
    TabOrder = 0
    object RowDetailData: TRowDetailPanelControlEh
    end
  end
  object DBGridEh2: TDBGridEh
    Left = 8
    Top = 272
    Width = 945
    Height = 297
    DataSource = DataSource2
    DynProps = <>
    IndicatorOptions = [gioShowRowIndicatorEh]
    TabOrder = 1
    object RowDetailData: TRowDetailPanelControlEh
    end
  end
  object ADOConnection1: TADOConnection
    Connected = True
    ConnectionString =
      'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security In' +
      'fo=False;Initial Catalog=NP;Data Source=server'
    LoginPrompt = False
    Provider = 'SQLOLEDB.1'
    Left = 72
    Top = 112
  end
  object ADOQuery1: TADOQuery
    Active = True
    Connection = ADOConnection1
    CursorType = ctStatic
    LockType = ltReadOnly
    Parameters = <>
    SQL.Strings = (
      'select top 10  * from NP_FundTrade')
    Left = 160
    Top = 112
    object ADOQuery1rec_id: TIntegerField
      FieldName = 'rec_id'
      ReadOnly = True
    end
    object ADOQuery1tr_no: TStringField
      FieldName = 'tr_no'
      Size = 50
    end
    object ADOQuery1tr_Amount: TBCDField
      FieldName = 'tr_Amount'
      Precision = 18
    end
    object ADOQuery1tr_CreateID: TStringField
      FieldName = 'tr_CreateID'
      Size = 50
    end
    object ADOQuery1tr_CreateTime: TDateTimeField
      FieldName = 'tr_CreateTime'
    end
  end
  object MemTableEh1: TMemTableEh
    Active = True
    FieldDefs = <
      item
        Name = 'rec_id'
        DataType = ftInteger
        Precision = 15
      end
      item
        Name = 'tr_no'
        DataType = ftString
        Size = 50
      end
      item
        Name = 'tr_Amount'
        DataType = ftBCD
        Precision = 18
        Size = 4
      end
      item
        Name = 'tr_CreateID'
        DataType = ftString
        Size = 50
      end
      item
        Name = 'tr_CreateTime'
        DataType = ftDateTime
      end>
    IndexDefs = <>
    Params = <>
    DataDriver = DataSetDriverEh1
    StoreDefs = True
    Left = 160
    Top = 168
  end
  object DataSource1: TDataSource
    DataSet = MemTableEh1
    Left = 264
    Top = 168
  end
  object DataSource2: TDataSource
    DataSet = cds
    Left = 344
    Top = 320
  end
  object dsp2: TDataSetProvider
    DataSet = MemTableEh1
    Left = 200
    Top = 320
  end
  object cds: TClientDataSet
    Active = True
    Aggregates = <>
    Params = <>
    ProviderName = 'dsp2'
    Left = 272
    Top = 320
  end
  object DataSetDriverEh1: TDataSetDriverEh
    ProviderDataSet = ADOQuery1
    Left = 264
    Top = 112
  end
end


pas
Code:
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DBGridEhGrouping, ToolCtrlsEh,
  DBGridEhToolCtrls, DynVarsEh, MemTableDataEh, Data.DB, DataDriverEh,
  Datasnap.DBClient, Datasnap.Provider, MemTableEh, Data.Win.ADODB, GridsEh,
  DBAxisGridsEh, DBGridEh;

type
  TForm1 = class(TForm)
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    MemTableEh1: TMemTableEh;
    DataSource1: TDataSource;
    DataSource2: TDataSource;
    dsp2: TDataSetProvider;
    cds: TClientDataSet;
    DBGridEh1: TDBGridEh;
    DBGridEh2: TDBGridEh;
    DataSetDriverEh1: TDataSetDriverEh;
    ADOQuery1rec_id: TIntegerField;
    ADOQuery1tr_no: TStringField;
    ADOQuery1tr_Amount: TBCDField;
    ADOQuery1tr_CreateID: TStringField;
    ADOQuery1tr_CreateTime: TDateTimeField;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

end.


Attachments:
无标题.png
无标题.png [ 42.16 KiB | Viewed 6287 times ]
Top
 Profile  
 
PostPosted: 16 Mar 2015, 09:24 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

ClientDataset's is a standart VCL components, not part of EhLib library.
Try to create a Demo project usign standart VCL components like ClientDataset, DataSource, DBGrid and put it at Embarcadero Quality Central.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group