Skip to main content
Solved

Update sql Query Acumatica


SadokHanini
Freshman II

Hello,


It’s possible to execute an update sql query by code in Acumatica?
I wanna update a field that exist in the database but not in the DAC

 

Thanks .

 

Best answer by Hughes Beausejour

There’s probably nothing blocking it:
Use Visual Studio with .NET and C# to query - Azure SQL Database & SQL Managed Instance | Microsoft Docs

However there is no built-in library in Acumatica to do so. Direct access to database bypass all security measures and increases risk of data corruption. The most direct method to interact with a database in Acumatica is the PXDatabase class. This requires a valid DAC class for minimal data integrity  validations: Direct Database Updates with PXDatabase – Acumatica.dev

Accessing directly the database from within an Acumatica customization is highly discouraged.

View original
Did this topic help you find an answer to your question?

2 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • March 16, 2021

Hello Sadok,

This extended field might be available in “App_Runtime” folder in extended DAC. 

In your project solution, the same DAC you need to extend and add the same field and then by using this extended DAC, you can get this field in your graph and just do a cache update for that particular DAC.

 

Hope this helps!


Hughes Beausejour
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Developer Support Team
  • 91 replies
  • Answer
  • March 16, 2021

There’s probably nothing blocking it:
Use Visual Studio with .NET and C# to query - Azure SQL Database & SQL Managed Instance | Microsoft Docs

However there is no built-in library in Acumatica to do so. Direct access to database bypass all security measures and increases risk of data corruption. The most direct method to interact with a database in Acumatica is the PXDatabase class. This requires a valid DAC class for minimal data integrity  validations: Direct Database Updates with PXDatabase – Acumatica.dev

Accessing directly the database from within an Acumatica customization is highly discouraged.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings