DataDictionary Issue
Hi Guys,
Not sure if this is the right place to make the observation/report but..
Testing with MyDAC (therefore MySQL) and RB 10.01 in the enduser application.
When 'opening' the Datadictionary I can populate all the tables OK using
'Generate' however when I go to do the fields it falls over on the first table.
It is indicating that it can't continue due to a duplicate the key/index,
which there is as in the table in question, Accounts, there is a Primary Key on
Acctnumb and another key on Acctnumb with all the same parameters except not
Primary and therefore readily visible to various DB components.
I'm not sure if this is a RB issue or not as I don't recall coming across this
problem with other DBs where I have the same construct for the Keys.
Comments?
Regards,
Ian
--
Not sure if this is the right place to make the observation/report but..
Testing with MyDAC (therefore MySQL) and RB 10.01 in the enduser application.
When 'opening' the Datadictionary I can populate all the tables OK using
'Generate' however when I go to do the fields it falls over on the first table.
It is indicating that it can't continue due to a duplicate the key/index,
which there is as in the table in question, Accounts, there is a Primary Key on
Acctnumb and another key on Acctnumb with all the same parameters except not
Primary and therefore readily visible to various DB components.
I'm not sure if this is a RB issue or not as I don't recall coming across this
problem with other DBs where I have the same construct for the Keys.
Comments?
Regards,
Ian
--
This discussion has been closed.
Comments
Try modifying your library path to include RBuilder\Source and then perform
a run-time test using the tech tip below. Create a project and compile with
debug info. Configure the Delphi debugger to break on language exceptions.
Perhaps that will help to determine what is going on.
-------------------------------------------------------
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
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
- My thinking was that by creating a run-time example and adding
RBuilder\Source to the Delphi library path, the debugger would break on the
exception and show where the error ocurrs. You could also examine the call
stack, etc.
- My guess is that the error is related to how you have the rbFields tabled
defined. As a guideline, check out the RBuilder\Demos\EndUser Databases\SQL
Server\CreateEndUserTables.sql script. For the rb_Field table it contains
the following
/* create data dictionary field table */
CREATE TABLE rb_field
(table_name VARCHAR(60) NOT NULL,
field_name VARCHAR(60) NOT NULL,
field_alias VARCHAR(60),
datatype VARCHAR(60),
selectable CHAR(1),
searchable CHAR(1),
sortable CHAR(1),
autosearch CHAR(1),
mandatory CHAR(1),
PRIMARY KEY (table_name, field_name));
CREATE UNIQUE INDEX rb_table_field_name_idx ON rb_field (table_name,
field_name);
CREATE UNIQUE INDEX rb_table_field_alias_idx ON rb_field (table_name,
field_alias);
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com