Working MSAccess with sql 2008

User avatar
sistemaPR
2StarLounger
Posts: 119
Joined: 01 Jul 2013, 14:08

Working MSAccess with sql 2008

Post by sistemaPR »

I am connecting a ms access db with an sql server 2008. the table have more than 20 millinos of records, data since 2008.
I made a link to that table, but for any query that I do, It does not respond. When I make the link to this table, Access tells me that I need to define a key. but this tables does not have a primary key.

I made the link table selecting the first field of the table. this table has some indexes. I try to make a queries using this indexes and is not working either

HELP !

User avatar
HansV
Administrator
Posts: 78586
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Working MSAccess with sql 2008

Post by HansV »

Try adding a TIMESTAMP field to the table.
Best wishes,
Hans

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: Working MSAccess with sql 2008

Post by CData »

What is your edition of Office/Access? and what is the RAM of your PC? Are you the SQL Server administrator? 20M records is too many for Access/PC to manage. You need to write out a smaller record set to work with.

User avatar
Wendell
4StarLounger
Posts: 482
Joined: 24 Jan 2010, 15:02
Location: Colorado, USA

Re: Working MSAccess with sql 2008

Post by Wendell »

I agree with Hans suggestion - and it appears from some of your prior posts that you do have the ability to change the design of the table. To work effectively with Access, SQL Server tables (and views) need to have a primary key. The other thing to look at is the design of your query. As long as you keep it to a single table, or at most a simple join to a lookup table (in SQL Server) then the ODBC driver will convert your query to a SQL Server query, and return a reduced recordset. For complex queries, Access will try to pull in the entire 20M row table and perform the query in Access, and it takes forever to run, or Access hangs. One final question - is this a permanently linked table, or are you linking on the fly?
Wendell
You can't see the view if you don't climb the mountain!