Solved

Link Access 2010 to multiple ODC files

Posted on 2014-07-22
9
2,875 Views
Last Modified: 2014-07-24
Dear Experts

I am trying to create an reporting database in Access 2010. The data sources that I want to report on are available in various .odc files is there a way to link these to Access (same as per an excel linked table)?

Its an assumption, but I presume it would be a lot more efficient to connect these data sources directly without using loads of excel spread sheets.

Can anyone help?
0
Comment
Question by:correlate
  • 4
  • 4
9 Comments
 
LVL 84
Comment Utility
Access can link to any ODBC-compliant data source, so if you can determine where those Excel connections are "pointing" you can link directly to the source. Access can also link to different sources in the same database - so I can link to Data1.accdb, Data2.accdb, a SQL database, and a Text file, all in the same Access database.

To do that, you use the External Data - Import & Link ribbon item in Access, and select the appropriate type of source (Text file, ODBC Database, XML File, etc). Access includes wizards to walk you through the process.

See this MSFT help article for more information: http://office.microsoft.com/en-us/access-help/learn-how-to-import-or-link-to-data-HA010107827.aspx
0
 
LVL 22

Assisted Solution

by:Kelvin Sparks
Kelvin Sparks earned 250 total points
Comment Utility
Have a look at http://msdn.microsoft.com/en-us/library/bb326418.aspx
From reading that they will be ODBC or OLE DB files. ODBC, SCott has described above, if an OLE DB, then you need to set up a DSN-Less connection (which uses OLE DB) - these just create linked tables using OLE DB.

Kelvin
0
 
LVL 84
Comment Utility
I think the OP is referring to Excel data connections, which is essentially a "linked table" in Access:

http://office.microsoft.com/en-us/excel-help/create-edit-and-manage-connections-to-external-data-HA010167227.aspx#BMcreate_an_office_data_connection_(odc

But I could be wrong ...
0
 

Author Comment

by:correlate
Comment Utility
Hi Thanks for these, I have opened the .odc file in notepad and it looks like  its an OLE DB ...
 <odc:Connection odc:Type="OLEDB">

I'm struggling to set up the DSN-Less connection as there is no option in the wizards that I can see, I came across this http://support.microsoft.com/kb/892490 which was of some help, but I cannot find a load of the connection details in the .odc file - Any other ideas?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 84
Comment Utility
You can't use the wizard to create a DSN-less connection. That must be done through code.

What sort of datasource are you connecting to? Is it a SQL Server database, Text file, etc?
0
 

Author Comment

by:correlate
Comment Utility
the data source is an .odc file - I have put the notepad version of the file below which I hope helps answer your question - alas I'm a bit clueless on this side

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/x-ms-odc; charset=utf-8">
<meta name=ProgId content=ODC.Table>
<meta name=SourceType content=OLEDB>
<title>cats2</title>
<xml id=docprops><o:DocumentProperties
  xmlns:o="urn:schemas-microsoft-com:office:office"
  xmlns="http://www.w3.org/TR/REC-html40">
  <o:Name>cats2</o:Name>
 </o:DocumentProperties>
</xml><xml id=msodc><odc:OfficeDataConnection
  xmlns:odc="urn:schemas-microsoft-com:office:odc"
  xmlns="http://www.w3.org/TR/REC-html40">
  <odc:Connection odc:Type="OLEDB">
   <odc:ConnectionString>Provider=SQLOLEDB.1;Password=iDxxxxxxxxx;Persist Security Info=True;User ID=dbuReportingInvenias_7bd065a429;Initial Catalog=Invenias_7bd065a429;Data Source=(local)\INVENIAS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GALT008;Use Encryption for Data=False;Tag with column collation when possible=False</odc:ConnectionString>
   <odc:CommandType>Table</odc:CommandType>
   <odc:CommandText>&quot;Invenias_7bd065a429&quot;.&quot;dbo&quot;.&quot;CategoryListEntriesView&quot;</odc:CommandText>
  </odc:Connection>
 </odc:OfficeDataConnection>
</xml>
<style>
<!--
    .ODCDataSource
    {
    behavior: url(dataconn.htc);
    }
-->
</style>
 
</head>

<body onload='init()' scroll=no leftmargin=0 topmargin=0 rightmargin=0 style='border: 0px'>
<table style='border: solid 1px threedface; height: 100%; width: 100%' cellpadding=0 cellspacing=0 width='100%'> 
  <tr> 
    <td id=tdName style='font-family:arial; font-size:medium; padding: 3px; background-color: threedface'> 
      &nbsp; 
    </td> 
     <td id=tdTableDropdown style='padding: 3px; background-color: threedface; vertical-align: top; padding-bottom: 3px'>

      &nbsp; 
    </td> 
  </tr> 
  <tr> 
    <td id=tdDesc colspan='2' style='border-bottom: 1px threedshadow solid; font-family: Arial; font-size: 1pt; padding: 2px; background-color: threedface'>

      &nbsp; 
    </td> 
  </tr> 
  <tr> 
    <td colspan='2' style='height: 100%; padding-bottom: 4px; border-top: 1px threedhighlight solid;'> 
      <div id='pt' style='height: 100%' class='ODCDataSource'></div> 
    </td> 
  </tr> 
</table> 

  
<script language='javascript'> 

function init() { 
  var sName, sDescription; 
  var i, j; 
  
  try { 
    sName = unescape(location.href) 
  
    i = sName.lastIndexOf(".") 
    if (i>=0) { sName = sName.substring(1, i); } 
  
    i = sName.lastIndexOf("/") 
    if (i>=0) { sName = sName.substring(i+1, sName.length); } 

    document.title = sName; 
    document.getElementById("tdName").innerText = sName; 

    sDescription = document.getElementById("docprops").innerHTML; 
  
    i = sDescription.indexOf("escription>") 
    if (i>=0) { j = sDescription.indexOf("escription>", i + 11); } 

    if (i>=0 && j >= 0) { 
      j = sDescription.lastIndexOf("</", j); 

      if (j>=0) { 
          sDescription = sDescription.substring(i+11, j); 
        if (sDescription != "") { 
            document.getElementById("tdDesc").style.fontSize="x-small"; 
          document.getElementById("tdDesc").innerHTML = sDescription; 
          } 
        } 
      } 
    } 
  catch(e) { 

    } 
  } 
</script> 

</body> 
 
</html>

Open in new window

0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
Comment Utility
Ok - I think Kelvin was right, this is a SQL Server Report connection. I have no experience with connecting with that platform, so I'll leave this to others. From what I can tell, there is no way for Access to connect to that .ODC file.

That said, your connection obviously hits a server - could you not just link the tables needed with an ODBC connection, and get your data that way?

Did you create the original connection?
0
 

Author Comment

by:correlate
Comment Utility
Alas I didn't create the original connection - that came as part of the CRM software we use - I'll probably have to go back to them to find the details
0
 

Author Closing Comment

by:correlate
Comment Utility
Thanks for you help on this, In the end I managed to find an ODBC connection to the data source
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Data center mess 4 45
Supress Detail 4 17
Unbound TextBox: Change color when clicked 5 13
Max per month 3 13
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 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

9 Experts available now in Live!

Get 1:1 Help Now