• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

Access tables export as a routine to a sql instance sharepoint 2010 will then use as a source

Ridiculous to be sure; but a production environment using a split access database cannot be disrupted; so building scaffolding around the production access tables for reports, etc.

If proof of concept materializes, then SharePoint could well take over as it was intended; where sql on SP will be the back end, access front end can continue to do the job as it has in the past and SP can start doing the things it does to serve information based on common (access front end and sp) sql data.

Now question; is it possible to routinely export access data to a sql instance that sharepoint can use for external content?  Keeps the access tables db alive and alone in production, whilst sharepoint dev/test can continue using somewhat live data.  I see no way for sp to connect directly to access db tables, which would be best outcome.  Have successfully exported access tables to sp using access and all looks fine.  But given data is a one time load from access to sp; how to keep the sp data up to date, at least once/day?

As I said "ridiculous" to be sure, but best idea I've had to get out of the rut and allow sp dev lab to progress, while access live db stays untouched in production.
0
VirtualKansas
Asked:
VirtualKansas
  • 2
  • 2
2 Solutions
 
burrcmCommented:
If the db is small enough to run in Access, then the uber simple solution would be to schedule a delete all from the sql db and reload the whole database, at a time when there is nothing much going on. If there is no idle time, then it would have to be appends based on new records; the simple way would be daily based on date.

Chris B
0
 
Mark WillsTopic AdvisorCommented:
Well, you also mentioned that Access was front end - does that mean you have plans to move the database to SQL ?

SQL Server can connect to Access and import directly

You can also control it from the Access end and there are various documents like : http://office.microsoft.com/en-au/access-help/import-or-link-to-sql-server-data-HA010200494.aspx or http://support.microsoft.com/kb/892490 as a couple of examples

But I would be inclined to set up a linked server (in SSMS) to it can read the access database.

You could also use an openrowset operation to access the access tables...

e.g.  In SQL Server

-- openrowset to access a specific table (customers) in an Access DB (C:\EE\Test.accdb)

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','C:\EE\Test.accdb';'Admin';'',Customers)
GO

-- or set up a linked server to Access as a more permanent connection :

EXEC sp_addlinkedserver 
      @server = 'lnksvr_Access', 
      @provider = 'Microsoft.ACE.OLEDB.12.0', 
      @srvproduct = 'OLE DB Provider for ACE',
      @datasrc = 'c:\EE\Test.accdb'
GO

-- now add in a login - Office does like to have an "admin" user

EXEC sp_addlinkedsrvlogin 
      @rmtsrvname = 'lnksvr_Access',
      @useself = 'FALSE',
      @locallogin = NULL, 
      @rmtuser = 'Admin', 
      @rmtpassword = NULL
GO

-- now just to test if linked server worked properly, let's list all the tables

EXEC sp_tables_ex 'lnksvr_Access'
GO

-- and then we can simply use a 4 part identifier for the select clause

select * from lnksvr_Access...customers

-- and then drop the server when we have finished playing with it

sp_dropserver lnksvr_Access, droplogins

Open in new window


Now, there needs to be a trusted relationship from the actual server to where the Access datbase lives.

Then when it comes to updating a local database table in SQL Server, then simply do an "insert ... select ... where not exists ()" type update on the SQL Server table.

If there are unique keys, then use them to first update if already there, then insert if not already there, and delete if they are there but shouldnt be.

And it is not that ridiculous :)
0
 
VirtualKansasAuthor Commented:
Good morning EE's and thank you for replies...  I'm  little thick headed this early on a Sunday, but thank you for the plans.  Will follow through, shortly.  Thanks & regards...
0
 
VirtualKansasAuthor Commented:
I have to be honest and close this one out with my thanks.  There has been a temporary redirection of efforts and I won't be able to get back to this thread in a timely manner; so will close and split points as haven't been able to use either excellent ideas.  Apologies if even split is lop sided; clearly both answer are on point.  Thank you, talk to you soon...
0
 
Mark WillsTopic AdvisorCommented:
No problems, but if you do get a chance and post another question, would be good to see the link here too :).

Cheers, and hope to see you again soon.

Mark Wills
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now