View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Hard Code link to Data Source

Hi Pip""n


How do I rebuild the data source so that it doens't reference a connection
that is stored on the host machine?


AFAIK, the DATABASE field expexts to find the "data source" somewhere in the
Windows file system.

e.g., if you copy your .odc file to a network folder that can be accessed
via a UNC pathname or a driveletterx:\pathname you should still be able to
use your DATABASE field. The .odc should describe the /source database/ in a
way that is not relative to the location of the .odc itself.

If you can't do that, there is no alternative AFAIK, because you can't point
to a SQL without a .udl, .odc, or old-style .dsn (for ODBC connections) and
in the case of ODBC, you must at least have the ODBC driver on the machine,
and a suitable ODBC DSN or .dsn file.

Peter Jamieson


"Pip''''n" wrote in message
...
I have a merge document that is located on a server that is accessed using
a
local company intranet. I have built my application to work on my local
host
and am now about to move it to the live server however I notice that the
data
source links in my database fields use access a data source link that is
stored on my local machine.

The database field reads: { IF { DATABASE \d "C:\\Documents and
Settings\\username\\My Documents\\My Data Sources\\CompName MyIntranet
mailMerge_Service.odc" \s "SELECT PATINDEX('%, 37,%', ', ' + ProductLookup
+
',') FROM \"mailMerge_Service\"" \O#} ......

How do I rebuild the data source so that it doens't reference a connection
that is stored on the host machine?

The name of the data source in this case is "MyIntranet
mailMerge_Service.odc".