ExternalSQL Tables
Describe the bug Error message when accessing ExternalSQL table.
The following SQL error was unexpected: Invalid object name 'DB-Deploy.dbo.ADUser$f1e0e37e-2089-422f-8ffb-c808237b831e'. Statement(s) could not be prepared.
To Reproduce Steps and/or AL code to reproduce the behavior: table 76302 "Deploy AD User" { DrillDownPageID = "Deploy AD User"; ExternalName = 'ADUser'; ExternalSchema = 'dbo'; LookupPageID = "Deploy AD User"; TableType = ExternalSQL; . .
Expected behavior ExternalSQL table should be accessed by using only ExternalName without Extension ID $f1e0e37e-2089-422f-8ffb-c808237b831e added to the table name.
Versions:
- AL Langauge: 2.1.79379
- Business Central: W1 13.3 (27233)
app.json "target": "Internal",
BC on-prem CU03
Temporary SQL workaround:
Access from BC side: create table with suffix CREATE TABLE [dbo].[ADUser$f1e0e37e-2089-422f-8ffb-c808237b831e] (...)
Access from another world: use synonym CREATE SYNONYM [dbo].[ADUser] FOR [dbo].[ADUser$f1e0e37e-2089-422f-8ffb-c808237b831e]
Thank you for reporting the issue, the extension id should not be appended to external tables, I will fix this.
The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 28242.
If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo
For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://blogs.msdn.microsoft.com/freddyk/2018/04/16/which-docker-image-is-the-right-for-you/