Business Central OnPremise – Microsoft AL connected to SQL Server by .NET

sserrano
Member Posts: 5
Hi,
I have replicated the code, but when build it gives me the following error. I've done my research, but I not find anything.
https://robertostefanettinavblog.com/2023/06/22/business-central-onpremise-microsoft-al-connected-to-sql-server-by-net/
Error:
[2023-07-27 17:18:31.80] Publishing AL application using launch configuration 'BCTEST'.
[2023-07-27 17:18:32.19] Targeting server 'http://localhost', server instance 'BC220' and tenant 'default'.
[2023-07-27 17:18:32.19] Using Windows authentication.
[2023-07-27 17:18:32.21] Sending request to http://localhost:7049/BC220/dev/metadata?tenant=default
[2023-07-27 17:18:32.84] Publishing package to tenant 'default'
[2023-07-27 17:18:32.84] Sending request to http://localhost:7049/BC220/dev/apps?tenant=default&SchemaUpdateMode=synchronize&DependencyPublishingOption=default
[2023-07-27 17:18:38.05] Error: An error occured while processing the request.
Request ID: XXXXXXXXXXXXXXXXXXX
Session ID: XXXXXXXXXXXXXXXXXXX
If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.
[2023-07-27 17:18:38.06] The request for path /BC220/dev/apps?tenant=default&SchemaUpdateMode=synchronize&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Extension compilation failed
PROYECTO/CODEUNITS/Cod50000.X.al(114,20): error AL0132: 'DotNet "System.Data.SqlClient.SqlCommand"' does not contain a definition for 'CommandText'
PROYECTO/CODEUNITS/Cod50000.X.al(115,20): error AL0132: 'DotNet "System.Data.SqlClient.SqlCommand"' does not contain a definition for 'CommandTimeout'
The version it uses is (On prem)
ES Business Central 22.1 (Plataforma 22.0.56191.0 + Aplicación 22.1.55890.56216)
Thanks,
I have replicated the code, but when build it gives me the following error. I've done my research, but I not find anything.
https://robertostefanettinavblog.com/2023/06/22/business-central-onpremise-microsoft-al-connected-to-sql-server-by-net/
Error:
[2023-07-27 17:18:31.80] Publishing AL application using launch configuration 'BCTEST'.
[2023-07-27 17:18:32.19] Targeting server 'http://localhost', server instance 'BC220' and tenant 'default'.
[2023-07-27 17:18:32.19] Using Windows authentication.
[2023-07-27 17:18:32.21] Sending request to http://localhost:7049/BC220/dev/metadata?tenant=default
[2023-07-27 17:18:32.84] Publishing package to tenant 'default'
[2023-07-27 17:18:32.84] Sending request to http://localhost:7049/BC220/dev/apps?tenant=default&SchemaUpdateMode=synchronize&DependencyPublishingOption=default
[2023-07-27 17:18:38.05] Error: An error occured while processing the request.
Request ID: XXXXXXXXXXXXXXXXXXX
Session ID: XXXXXXXXXXXXXXXXXXX
If you are targeting a cloud instance, supply these IDs if contacting Microsoft support.
[2023-07-27 17:18:38.06] The request for path /BC220/dev/apps?tenant=default&SchemaUpdateMode=synchronize&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Extension compilation failed
PROYECTO/CODEUNITS/Cod50000.X.al(114,20): error AL0132: 'DotNet "System.Data.SqlClient.SqlCommand"' does not contain a definition for 'CommandText'
PROYECTO/CODEUNITS/Cod50000.X.al(115,20): error AL0132: 'DotNet "System.Data.SqlClient.SqlCommand"' does not contain a definition for 'CommandTimeout'
The version it uses is (On prem)
ES Business Central 22.1 (Plataforma 22.0.56191.0 + Aplicación 22.1.55890.56216)
Thanks,
0
Best Answer
-
Hi Sserrano,
Thanks for this post ( i have been pulling my hair out)
Can I ask how the assemble looks in AL
struggling to find the correct assembly name...
Cheers0
Answers
-
Hi sserrano,
these two things seem to have been removed in the platform dlls with BC22.x. We also used them in two of our objects and had now to refactor it. Unfortunately my devs forgot to link the pull request when closing the work item so I'm currently not able to give you a clue what they did 🤷🏻♂️
Regards
Markus0 -
Oh wait, I was wrong, the code they commented out a couple of weeks ago is now active again, however the workitem was closed - need to do further investigation on this issue - after my holidays :-)0
-
Solution. Thanks for comment.
They have changed assembly. In BC22. X. Instead of using System.Data.SqlClient is Microsoft.Data.SqlClient.
0 -
I have a similar issue but my problem is that Microsoft.Data.SqlClient is not installed on the server which is compiling the app when I publish it. Does anyone know what to install to get the assembly onto the machine?
Thanks,
Michael0 -
You can take the assembly, place it in your project and in the project indicate where it is located. I think that with that, it would work.I have a similar issue but my problem is that Microsoft.Data.SqlClient is not installed on the server which is compiling the app when I publish it. Does anyone know what to install to get the assembly onto the machine?
Thanks,
Michael0 -
Hi Sserrano,
Thanks for this post ( i have been pulling my hair out)
Can I ask how the assemble looks in AL
struggling to find the correct assembly name...
Cheers0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions