1

I got a SQL Server PriceLists table:

CREATE TABLE [dbo].[PriceLists](
    [PriceListId] [tinyint] IDENTITY(1,1) NOT NULL,
    [PLName] [varchar](20) NULL,
CONSTRAINT [PK_PriceLists] PRIMARY KEY NONCLUSTERED 

When I link it into Access 2007, Access sets the PriceListId to Long Integer (which is incorrect).
When I link other tables where the TinyInt is not "AutoNumber" (in Access jargon), it links correctly as a Byte field.
Any clue about properly attaching the table to have the PriceListId as an AutoNumber, Byte field?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
iDevlop
  • 24,841
  • 11
  • 90
  • 149
  • 1
    Is there a problem? That is, despite that fact that Access thinks the numeric type is Long Integer (SQL Server's regular Integer), since Access isn't writing these values, where is the problem? Does it throw an error somewhere? – David-W-Fenton Jan 18 '11 at 00:19
  • @David: no problem in fact. But it's just wrong, and I am afraid it would cause problem with links. You are forced to link a Long Integer (autonumber) to a byte. – iDevlop Jan 19 '11 at 20:19
  • Seems to me that it's much less of a problem than when your SQL Server autoincrement field is BIGINT, which Access can't understand at all, so you end up having to jump through hoops (with CAST and such) to work with it. Seems to me that if you work with BIGINT (as you can), TINYINT is going to be much less of a problem, and I really can't think of an issue that it would lead to. – David-W-Fenton Jan 20 '11 at 23:13

1 Answers1

0

I do not think you can, autonumber in Access is Long, and Help says that to link to an autonumber, you must use Long, which, I think, implies that that is all it will accept.

Here is some mapping: http://office.microsoft.com/en-us/access-help/about-differences-between-data-types-in-an-access-database-and-access-project-HP005274573.aspx

Fionnuala
  • 90,370
  • 7
  • 114
  • 152