AL icon indicating copy to clipboard operation
AL copied to clipboard

ExternalSQL Tables

Open rivolemmik opened this issue 7 years ago • 4 comments

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)

rivolemmik avatar Jan 28 '19 11:01 rivolemmik

app.json "target": "Internal",

BC on-prem CU03

rivolemmik avatar Jan 28 '19 17:01 rivolemmik

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]

IvoMol avatar Jan 29 '19 06:01 IvoMol

Thank you for reporting the issue, the extension id should not be appended to external tables, I will fix this.

jehelles avatar Feb 08 '19 13:02 jehelles

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/

ALGitHubBot avatar Feb 18 '19 10:02 ALGitHubBot