web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Change column size(StringSize) does not work in custom table in AX 2009.

(0) ShareShare
ReportReport
Posted on by

Hi All,

I've created custom table in AX 2009. Insertion, updation and deletion is working fine using x++ code.

But when I am trying to change one of the field size "StringSize" property then it gives error of "String and binary data truncated" during insert. If I revert back the column size to default which is 10 then it works.

Any idea what I am doing wrong here?

Thanks

Arun

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Have you tried to use String EDT?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Aren't you trying to insert a longer string than your field can store?

  • Suggested answer
    Community Member Profile Picture
    on at

    You are getting this error "String and binary data truncated" because when you are trying to insert string data into that particular field that does not fit in that field. So once try using EDT of desired string size.

  • Community Member Profile Picture
    on at

    Hi Martin,

    When I left it default size(10) then it cuts the string which I want to insert and when I try to increase the size(my string is 15 characters long) to 20 still it gave me error.

  • Community Member Profile Picture
    on at

    Hi Gautam,

    I've not tried with EDT yet.

    For that I just have to create a EDT and assign it to field. Is that right?

  • Community Member Profile Picture
    on at

    What error did you get when you change the property StringSize?

  • Community Member Profile Picture
    on at

    You can create a new string EDT or you can use standard one like "Name" it's stringsize would be 60 char.

  • Community Member Profile Picture
    on at

    I am getting this error "String or binary data would be truncated."

  • Community Member Profile Picture
    on at

    I'm guessing this error you get when you try to insert data in that field and i told the reason also. What error you're getting when you change the StringSize property of that field?

  • Community Member Profile Picture
    on at

    I've tried with Name EDT and still it gives me this error:-

    "Cannot create a record in SalesOrderBatch (SalesOrderBatch).

    The SQL database has issued an error." and  

    "SQL error description: [Microsoft][SQL Native Client][SQL Server]String or binary data would be truncated."

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans