Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Suggested answer

added column to database table how do I update dynamics to new schema

Posted on by Microsoft Employee

i add a column to the database that dynamics sl 2011 is using for inventory. getting an error you have made changes to production database.

How do I update dynamics for the changes to the schema

  • Suggested answer
    Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: added column to database table how do I update dynamics to new schema

    Hi,


    If you don't have avalible user fields or you don't want to use them, one solution is adding a new custom table and do a customization to do the insert, update and read functions, this table is one to one relatioship with the inventory table. If you are interested i can develop this customization with all the fields that you need.

  • NameBrands Profile Picture
    NameBrands 50 on at
    RE: added column to database table how do I update dynamics to new schema

    The .EXE's have the database layouts, columns and order of the columns, embedded in them because dynamics is based on a b-trieve application from way back where everything is an in memory cursor, so the databases cannot have any columns added to them at all ever except by Microsoft.  each table does have a 'user1', 'user2', etc that you can commandeer, but you cannot alter the database structure at all.  You can add tables and then add that table to a form through customization manager but it is a total pain.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: added column to database table how do I update dynamics to new schema

    Sorry, I do not know exactly how the newer versions of SL (written in VB.NET) connect to SQL but I believe it does not really matter.  The DH files that define the table structure define all the fields even if the particular code does not utilize some of those fields.  If you look in the DB\DHFiles folder under Dynamics SL you will see the various DH files for each standard SL table.  This may help you understand what I have tried to say.

    I do not follow your statement that you can recompile the code.  Unless you are under contract with Microsoft to develop/maintain Dynamics SL, you will not have access to the code for the standard SL programs.  Therefore, you would not have a way to recompile the code that incorporates the table you tried to modify.  What you can do, as Mark stated, is create your own table to hold you new data element(s) and use Customization Manager to include that table in a standard SL screen by providing your DH file for your table and linking your table to data elements on the screen.  For example, I have done this with some employee information that my clients wanted that are not included in the standard SL employee screen (e.g., emergency contact number, reason for termination, eligible for rehire, etc.).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: added column to database table how do I update dynamics to new schema

    But as a developer how is the database connected to the application? Is there a ADO / entity or some other type of access? Does the application use all the columns even though they are not part of the Dynamic application? I realize that these are a few questions but as a developer i am trying to find how it works. if need be I can recompile the code..

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: added column to database table how do I update dynamics to new schema

    Mark is correct with his responses.  I am just adding the reason why this is so because knowing why helps explain what might seem like a restriction.

    In order for the SL Customization Manager to work, the code must have an "image" of what the data structure is for each table and, hence, that image is embedded in each program that accesses that table.  That "image" is the DH files included in the code when it is compiled.  Now, before you think you can just change the DH file to match your table change, the key word phrase here is "when it is compiled" which means a program already has that image as it came from the developer.

  • Suggested answer
    Mark E Profile Picture
    Mark E 6,405 on at
    RE: added column to database table how do I update dynamics to new schema

    No, you can't, for the reason I mentioned.  The schema files are embedded in the .exes, and you cannot change them.

    The correct approach is to create an "extension" table to hold your custom fields, and use VBA customization manager to reference the new table.  The CustomizationMgrReferenceVBA.pdf file in the SL\Applications\User Guides folder provides examples on how to do this.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: added column to database table how do I update dynamics to new schema

    Yes It did cause problems. That is the question can you update the DB to a new schema?

  • Mark E Profile Picture
    Mark E 6,405 on at
    RE: added column to database table how do I update dynamics to new schema

    If you are saying you added a column to a standard SL Inventory table, you just broke the system.  Schema changes to standard SL tables cause several issues, as the table schema is embedded in the source code of each .exe file, and cannot be changed.

    You need to reverse your action to allow the system to function properly.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans