Multiple Queries in a single Office Data Connection File

Hi
When I connect to a database through an ODC file, it lists all the tables in the database. In the properties of the connection file, I can specify whether the connection file is referring to a table, Stored Procedure or a Command Text. Now If I have an Excel Workbook with sheets containing data got by different SQL queries, Can I accomplish this with a single Office Data Connection file Or do i need to specify different .odc files for different queries

Thanks
Guruprasad Karnik


Answer this question

Multiple Queries in a single Office Data Connection File

  • Cest la vie

    Hi
    I found the answer. The ODC file represents a view or a table and hence for each of the report snapshots, one has to use different ODC files. The one shortcoming in the above case is that you cannot pass parameters into the query written in the ODC file properties since views by nature do not support parameters. If you need to provide a report in Excel with filtering option, then you need to go for Pivot Tables whose data source is the back-end database.

  • Multiple Queries in a single Office Data Connection File