Public Report
Report From: Delphi-BCB    [ Add a report in this area ]  
Report #:  69053   Status: Closed
DBXDataPump - dbxUtils.pas -DBXGetIndexColumns
Project:  Delphi Build #:  12.0.3210.17555
Version:    12.0 Submitted By:   Robert Love
Report Type:  Basic functionality failure Date Reported:  11/18/2008 5:57:28 AM
Severity:    Commonly encountered problem Last Updated: 11/18/2008 1:47:46 PM
Platform:    All platforms Internal Tracking #:  
Resolution: Fixed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
If you are trying to retrieve an Blackfish Unnamed index using the DBXGetIndexColumns you will get a parser error as the identifier is
<unnamed>[1]

this can be resolved by quoting the index name when generating the DBX Command.

I have attached the fixed method in workarounds.
Steps to Reproduce:
None
Workarounds
function DBXGetIndexColumns(const AProvider: TDBXMetaDataProvider;
  const ATableName, AIndexName: UnicodeString ): TDBXIndexColumnsTableStorage; overload;
var
  Coll:  TDBXTable;

begin
  // Retrieve a collection of the columns associated with an index in this table.
  Coll := AProvider.GetCollection(
    TDBXMetaDataCommands.GetIndexColumns + ' ' + AProvider.QuoteIdentifierIfNeeded(ATableName) +
    ' ' +  AProvider.QuoteIdentifierIfNeeded(AIndexName));
  CheckCollection(Coll, TDBXIndexColumnsTableStorage,
    'index columns for index ' + AIndexName + ' in table ' + ATableName);
  Result := Coll as TDBXIndexColumnsTableStorage;
end;
Attachment
None
Comments

None

Server Response from: CODE1