Home DADE

Datadictionary Asta 3 + RB 10 Troubleshooting

edited August 2008 in DADE
Hi folks.

I'm trying to figure out how to make it work the Datadictionary with my Asta
3
application, I have RB 10 installed on my computer.

The Explorer and Designer components work ok with the daAsta and dadtqAsta
utils.

But for some strange reason the Data Dictionary can't connect to my asta
application server and brings me the next message:

"Check connection to the database in the datasettings dialogs".

This last message only displays me when I access the "Fields" and "Joins"
tab inside DataDictionary builder.

Any ideas?



Regards

Comments

  • edited August 2008

    Make sure you have configured the DataDictionary.BuilderSettings to connect
    to the database.

    Here is a tech tip on how to run the DataDictionaryBuilder at run-time so
    that you can use the Delphi debugger to determine what the problem might be.
    Add RBuilder\Source to the Delphi library path. When the exception occurs,
    examine the call stack.

    -------------------------------------------------------
    Tech Tip: Using the DataDictionary Builder at Run-time
    -------------------------------------------------------

    Is it possible to run the DataDictionary Builder at run-time?

    Example:


    uses
    daDataDictionaryBuilder;


    procedure TForm1.Button1Click(Sender: TObject);
    var
    lForm: TdaDataDictionaryBuilderForm;

    begin
    lForm := TdaDataDictionaryBuilderForm.Create(Application);
    lForm.DataDictionary := ppDataDictionary1;

    if lForm.ValidSettings then
    lForm.ShowModal
    else
    ShowMessage(lForm.ErrorMessage);

    lForm.Free;
    end;


    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2008
    Thanks Nard

    I tested your solution and works EXCELLENT, but only in runtime :( ... in
    design time crash my delphi project and I can't access any of the folders.

    Also in runtime my Report component doesn't detect the Data Dictionary so
    there is no Pipelines to select in order to create a Report with Drag & Drop
    operations.

    Do you have an example of creating an end user reporting in solution in
    runtime?

    Thanks a lot.


  • edited August 2008

    If the DataDictionary does not work at design-time then try to determine
    what is different. Perhaps the ASTA connection is not working at
    design-time.

    Use the TppDesigner.DataSettings to configure the data access that will be
    used at run-time.

    In general, all the components - report, designer, data dictionary should
    have the same Owner. The Owner is the Form/DataModule that contains them.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2008
    Nard:

    I can make it work with your last instructions however I need to manipulate
    the Query Designer in order to hide some columns and show another fields,
    can you tell me what dfm or pas files do I need to change in order to this?

    Also is there a way to manipulate the Query and Report Wizards?

    Thank you so much
    Alejandro


  • edited September 2008
    Nard:

    In the Query Wizard the step 2 allow us to select what fields to work with,
    is there a way to show the fields in step 1 when a user select any of the
    available tables?.

    In this way if I select Table1 the Wizard will show me only the fields of
    that table.

    Thanks

  • edited September 2008

    daQueryWizard.pas and daQueryDesigner.pas contain the source to the
    QueryWizard and QueryDesigner.

    You can creating custom wizards and register them with RB. See the following
    tech tip.


    ----------------------------------------------------------------------------------
    Tech Tip: Implementing a Custom Data Designer
    ----------------------------------------------------------------------------------

    Data Designers descend from TdaCustomDataWizard which is defined in
    daDataWizard.pas.

    The TdaCustomDataWizard class defines a class function called DataViewClass
    that should be overriden by descendants classes to specify the DataView
    class for which the data designer is implemented.

    The daRegisterWizard and daUnRegisterWizard procedures defined in
    daDataWizard.pas are used to register and unregister Data Designers with
    DADE.

    For an example of a data designer, see daQueryDesigner.pas which contains
    the default QueryDesigner. The TdaQueryDesigner class overrides the
    DataViewClass method to return TdaQueryDataView. Therefore, the
    QueryDesigner is used with any descendant of TdaQueryDataView
    (TdaADOQueryDataView, TdaBDEQueryDataView, etc.).

    For an example of registering a Data Designer, see the initialization and
    finalization sections of daIDE.pas.

    Note: To replace an existing Data Designer, unregister the default designer
    first:

    initialization

    daUnRegisterWizard(TdaQueryWizard);
    daUnRegisterWizard(TdaQueryDesigner);

    daRegisterWizard(TmyCustomQueryWizard);
    daRegisterWizard(TmyCustomQueryDesigner);

    finalization

    daUnRegisterWizard(TmyCustomQueryWizard);
    daUnRegisterWizard(TmyCustomQueryDesigner);


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2008
    You can create a custom wizard with that type of interface - I just replied
    to your prior post with the info on how to do that.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2008
    Nard:

    I almost finish the implementation of my custom query wizard, I want to know
    what function, method or property I need to use in order to get the
    available fields of an specific table?

    I studied the daSQL.pas file.

    I'm trying with SQL.AvailableSelectFields[] but I need to select the table
    first, is there another way to get ALL the fields and filter those
    containing an specific table name?

    Thanks

  • edited September 2008

    You might using some of the code in TdaSQL.CreateFieldsForTable. It uses
    gMetaDataManager (global meta data manager class) to retrieve the field
    info.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.