Using Delphi 10.3.3, mainly under Windows10, I have a number of [FireDAC] TFDTable components accessing an SQL Server DB.
Everything worked fine in delphi 10.2.3 but in the Rio version, I find that those TFDtables which have an indexname set and which access a DB whose name has a space in it, fail with the message "[FireDAC]{DatS]-2 Object [PK_DEPT] is not found."
An example of the table definition in the dfm is:
object tbHODEPT: TFDTable
IndexName = 'PK_DEPT'
ConnectionName = 'HEADOFFICE'
FetchOptions.AssignedValues = [evMode]
FetchOptions.Mode = fmAll
UpdateOptions.UpdateTableName = 'DEPT'
TableName = 'DEPT'
The connection, "HEADOFFICE", is a TFDConnection descendant which just adds the credentials for the relevant DB at open-time. I have noticed that if I supply a fully qualified TableName property (e.g. '[Some DBname].dbo.[DEPT') then the problem does not occur. But setting the DBname at design time is undesirable as we allow the DB names to be configurable.
Barring a solution, my options seem to be
- Renaming the problematic DB, and
- Changing all of the affected TFDTables to use indexfieldnames instead. (This works OK).
Ideas welcome.