Access Database- Linking to SQL Server Data Source

BlueRhinos

Board Regular
Joined
Aug 31, 2007
Messages
83
We're exploring the idea of linking our access database to a sql server database.

When we go down this route, the application gives us 2 options. Our thought is that option #2- Linking to a SQL Server Db by Creating a Linked table is the way to go.

However, the system goes on to say that Changes Made to the data in access will be reflected in the source data and vice versa.

Can someone help clarify this? I can't see how our changes in an Access db would effect a sql server source database.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Why wouldn't the changes be reflected in a linked data source?

It shouldn't matter if it's SQL Server, another Access DB or another datasource, in fact is kind of the whole point of using linked tables.:)

If you don't want the data to be able to be updated you'll probably need to look into some other approach.
 
Upvote 0
Hi,

We've recently moved all our tables to a SQL server.

When you link I link the tables over an ODBC connection we cannot update the table within access but strangely an append query works fine.

What I do is create a temporary staging table for appending. For updates I use VBA to create a connection and execute the SQL.

If you want to control the entry of data just set up permissions and schemas up i.e. db_datareader only. Best practise however is to create views and then link the views instead of tables.

Hope it helps
 
Upvote 0
...
However, the system goes on to say that Changes Made to the data in access will be reflected in the source data and vice versa.

Can someone help clarify this? I can't see how our changes in an Access db would effect a sql server source database.
that's what linked tables are; not copies, but links, like links in a chain, connected; access is just a connection to sql server, access doesn't store any data, its just a front end that links your to your data;
but while you can change the data in access, you can't change the table structure

...
When you link I link the tables over an ODBC connection we cannot update the table within access but strangely an append query works fine....

do you have primary keys in all the linked tables ?
the reason access can't update linked tables is because it can't figure out which record to update if the table doesn't have a primary key; but if the linked table does have a primary key then access is able to update it

I don't think you can update linked views though; just like you can't update union queries
 
Upvote 0
the system goes on to say that Changes Made to the data in access will be reflected in the source data and vice versa

All good comments so far. But what is "the system"? Are you using a specific conversion utility made for your application? Or something in Access? At any rate, the message is correct. Databases can generally connect to each other and do all kinds of things - the beauty of ODBC and other connection technologies. In SQL Server-Access integrations, it's usually SQL server that stores the data and Access that acts as an interface for users (Forms, Queries, Reports). It should be possible to control these connections sufficiently - via permissions, access rights, using read-only connections, etc. etc. As mentioned, one idea is connecting to SQL server via a query/view that is read-only, rather than directly linking tables, which would help to "lock down" the data from mishaps (we assume the data is in SQL Server in this case).
 
Upvote 0
do you have primary keys in all the linked tables ?
the reason access can't update linked tables is because it can't figure out which record to update if the table doesn't have a primary key; but if the linked table does have a primary key then access is able to update it

Never knew that. You're right, I had no primary keys. By adding a primary key it all updates. Thanks for the info.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top