Hi,
I’ve created “linked tables” from SQL Server to Access. The datatypes for ‘decimal’ and ‘numeric’ in SQL Server will changed to ‘text’ in Access. Why is it so? Any way to correct it? Thanks…
Regards,
88
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Datatype – SQL Server to Access (Access 97)
I believe that it has to do with the Size, Precicision, and Scale of the data fields.
In one of my Access 97 apps SQL numeric fields with 5(5,0) are shown as Number, Long Integers in Access.
Numeric fields with 13(22,6) and 13(20,0) are shown as Text in Access.
I can think of three ways to solve the problem:
(1) Modify the SQL tables to a lesser scale and precision
(2) Use the conversion functions (CDbl, CInt, CLng, etc.) to change the data type in queries, reports, etc.
(3) Updgrade to Access 2000, which doesn’t seem to have this problem.
The only data type in Access that is even similar to the decimal or numeric types in SQL Server is the currency field. Those data types in SQL Server are essentially BCD (Binary Coded Decimal) encoded types which eliminate the round-off problems you get with floating point numbers like you have in Access. You really don’t want to use them in a database where Access is used as the front-end, or at least certainly not where you need to do calculations.
Views are attached to in the same fashion that you refer to tables – whether using DAO or ADO. They can be linked using ODBC, and appear to Access as a SQL Server table. However there is an issue of updatability as it pertains to indexes – in older versions of SQL Server you couldn’t have an index on a view. SQL Server 2000 does support that, though not all SQL types will be familiar with it. If the view doesn’t have an index, Access will ask you to identify the primary key of the table. If you don’t, it won’t let you do updating with any query that uses the view, and in later versions, may not even let you update the table.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.