Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

upgrade an existing SQL table using Dexterity

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have created a small add-in for GP using dex with a few tables.  Recently, I made some changes to this add-in, as well as added a new column to one of the table definitions. 

When i install the new .cnk file i get a sql error stating that the table definition doesn't match. I know why I am getting this error (the new column) but i don't know  how do I upgrade the table definition via code rather than drop and recreate the table.  I looked at an example of a table conversion on Customer Source but that seems really extensive for just adding a column to a table.  Can anyone point me in the right direction here to a blog post or other form of example?

Thanks,

Aaron

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: upgrade an existing SQL table using Dexterity

    If you added any addition column to existing tables, you can't upgrade the table without drop and recreate.

    To recreate table manually follow Waliullah suggestion.

    If you want to drop and recreate the table from code, call the get table table_name code in Startup script from Dexterity. While login into GP, it code will recreate you table automatically or write a SQL statement code via dexterity to drop and recreate tables.

    Hope this helps!!!

  • RE: upgrade an existing SQL table using Dexterity

    Hi Aaron,

    This post is very old, but for the sake of answering it I have run SQL Maintenance from GP 10.0 and select my product from the drop down. Search for my custom table and select options Drop Table, Create Table, Drop Auto Procedure and Create Auto Procedure. After selecting click Process button and it will resolve your issue.

    Waliullah

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans