Results 1 to 3 of 3
  1. #1
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277

    Changed size of DECIMAL column in SQL Server, Access doesn't accept it

    Hello,



    I had a DECIMAL(6,2) column created in SQL Server. When migrating data, I realized that this is too small, as I need to store values above 9999.99. Therefore, I altered the column to be DECIMAL(10,2):

    https://i.imgur.com/aYAp3jy.png

    The problem is that Access still consideres the linked views to be DECIMAL(6,2) and gives me the "precision errror".

    https://i.imgur.com/NpvXfX0.png

    I relinked the view, of course. Tried deleting it completely and linking again, as well as right click & update link.

    Any ideas what I should do? Thank you very much.

    Tomas

  2. #2
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    277
    Okay, I will answer myself, if anyone comes across this issue. What helped was to drop and create the view itself on the SQL server. :-)

  3. #3
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,144
    The explanation behind that is that the view will set a default datatype based on the underlying data when it's created.
    The same can happen with Varchar() data type. If you created a field

    'ShortText' as MyTxtField

    Then linked to it in access you will see the datatype as ShortText with a field size of 9 and in SSMS look at the columns for the view and it will say Varchar(9)
    Without altering and then saving the view, that setting will "stick".
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-08-2022, 02:10 PM
  2. Replies: 16
    Last Post: 11-08-2022, 10:46 AM
  3. Replies: 7
    Last Post: 02-27-2015, 09:21 AM
  4. Convert decimal comma to decimal point
    By Hans Karlsson in forum Programming
    Replies: 3
    Last Post: 06-30-2014, 01:56 PM
  5. Replies: 7
    Last Post: 05-29-2009, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums