Solved

Link Access 2010 to multiple ODC files

Posted on 2014-07-22
9
3,028 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
 

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 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

25 Experts available now in Live!

Get 1:1 Help Now