Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Link Access 2010 to multiple ODC files

Posted on 2014-07-22
9
3,245 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
ID: 40211011
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
ID: 40211022
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
ID: 40211172
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:correlate
ID: 40211187
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
 
LVL 84
ID: 40211227
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
ID: 40211253
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
ID: 40211338
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
ID: 40211418
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
ID: 40216198
Thanks for you help on this, In the end I managed to find an ODBC connection to the data source
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

840 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