Peter, Thanks for the info but I'm not getting a sql error. The problem I
found to be with the length of the merged fields. When I shortened them the
problem went away.
Would you happen to know what the field lengths limits are and/or other
limits e.g. naming schemes for merging data?
Thanks again
David
I'd be surprised if you were getting a /message/ as a result of the values
of the fields being too long. Word generally just truncates the data and
says nothing.
I don't know all the rules for dealing with names, but for text files in
Word 2003, Word
a. truncates names over 40 characters.
b. if you connect using ODBC or Word's internal text converter, word
displays the same names in dropdowns as the field names it recognises.
however, if you connect using OLEDB, it displays a name, truncated to 64
characters, in the drop-down filed insertion menu on the merge toolbar and
in the Mail Merge Recipients box. However, it may not display the actual
name - it may display the name preceded by the filename and a #.
c. If you have 2 long names over 40 characters and the first 40 characters
are the same, with the text converter, Word will "mangle" the names, e.g. if
the 40 characters end in xxx, the first name will probably end in xxx and
the second in xx1, but of course there could be a real name whose first 40
characters ends in xx1, so the algorithm needs to be a bit more complicated.
ISTR there used to be a knowledgebase article about this. However, with
OLEDB Word truncates both names and it becomes impossible to insert the
data for the second name using a mergefield.
So I guess it's not a bad idea to stick to names less than 40 characters
long...
Peter Jamieson
> Peter, Thanks for the info but I'm not getting a sql error. The problem I
> found to be with the length of the merged fields. When I shortened them
[quoted text clipped - 54 lines]
>> > data source name to data.doc but still having the same problem.
>> > Also are there field names that should not be used in merging data?
Peter Jamieson - 10 May 2006 21:57 GMT
Sorry, thought I was replying to the original poster.
I agree that it would be nice to have these rules better documented (there
may be appropriate KB articles - I haven't checked), although in some cases
the relevant documentation probably belongs with the appropriate ODBC
driver/OLEDB provider.
Peter Jamieson
> I'd be surprised if you were getting a /message/ as a result of the values
> of the fields being too long. Word generally just truncates the data and
[quoted text clipped - 86 lines]
>>> > data source name to data.doc but still having the same problem.
>>> > Also are there field names that should not be used in merging data?
david - 11 May 2006 12:22 GMT
The only message I always got (if not the administrator) was that the data
file could not be found when indeed it was there. However if someone else
ran the same word merge doc it worked fine and I could run it again then.
The problem ended up that the same person could not run that process back to
back or the data file error appeared.
I appreciate all your help and will use your recommendations in the future.
I don't think any of the field names were over 20 characters, but since I
changed them I can't be for sure.
> I'd be surprised if you were getting a /message/ as a result of the values
> of the fields being too long. Word generally just truncates the data and
[quoted text clipped - 81 lines]
> >> > data source name to data.doc but still having the same problem.
> >> > Also are there field names that should not be used in merging data?