Solved

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

Posted on 2013-01-19
5
365 Views
Last Modified: 2013-01-21
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
Comment
Question by:VirtualKansas
  • 2
  • 2
5 Comments
 
LVL 28

Assisted Solution

by:burrcm
burrcm earned 250 total points
ID: 38797873
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
 
LVL 51

Accepted Solution

by:
Mark Wills earned 250 total points
ID: 38797893
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
 

Author Comment

by:VirtualKansas
ID: 38798407
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
 

Author Closing Comment

by:VirtualKansas
ID: 38802983
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
 
LVL 51

Expert Comment

by:Mark Wills
ID: 38803676
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now