I suspect you are likely to get the same answer as last time. There does not
appear to be any documentation for the .odc format or how it is used by the
ODSO (Office Data Source Object) which I believe it is intendecd to work
with.
I don't know of any process to make a .odc other than going into e.g. Word,
trying to open a data source, and selecting New Source (or clicking on one
of the supplied .odc files that looks as if it's intended to be a template
for a data source.
What you then see is something like the Datalink editor dialog boxes that
are used to create .udl files, but they are wrapped in something that gives
you a .odc instead. But as far as I can see this is not done by a separate
..exe that you could start from Explorer. I assume it is all done in a .dll
somewhere that you might be able to use, but I don't know which one.
The .odc files themselves are obviously HTML files (so in some cases you can
double-click on a .odc and see the resulting data rows dispalyed in IE) with
embedded XML with tags for the connection string etc. When they are
displayed in IE, IE uses behaviours in DATACONN.HTC. If you start looking at
the tags in the .odc you will probably notice that they look as if the kind
of data sources that you need in Excel (including multidimensional cubes)
can be specified. You can probably work out from the codes roughly what is
possible and what is not, but my current suspicion is that it is not
possible to specify anything except a table name, simple SELECT * FROM
something query, or some kind of cube spec., i.e. attempting to put "SELECT
* FROM something WHERE criteria" is probably not going to be understood by
Word or Excel.
Finally, as far as I know a .odc file is required for any kind of OLEDB
connection /from Word/ that uses client/server rather than opening a
database file directly. But (in case it is any help to you) in some cases
you can leave the .odc completely empty and put all the connection info. in
an OpenDataSource call in Word (if you're trying to connect to a merge data
source), assuming your connection string is short enough.
And that's about all I know. Sorry I can't be more helpful.