View Single Post
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Data Source error

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

"Peter Jamieson" wrote in message
...
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

"david" wrote in message
...
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


"Peter Jamieson" wrote:

Can you say more about what the windows that appear are saying?

If one of them is asking about SQL, you probably need to read and apply
this
Knowledgebase article:

"Opening This Will Run the Following SQL Command" Message When You Open
a
Word Document"

at

http://support.microsoft.com?kbid=825765

I would guess that you might also be seeing a box that asks about
encoding,
or perhaps about the delimiters to use. Can you say which? Or maybe it
is
something else altogether.

What is the exact format of the file? e.g. is it comma-delimited, with
CR/LF
characters at the end of each line? Does it have multiline data in any
of
the fields? Does it just contain ANSI characters or does it have
accented
characters etc.

Also are there field names that should not be used in merging data?

Typically when Word sees a field name it doesn't like it modifies it,
but I
don't think there are any "reserved" names.

Peter Jamieson


"david" wrote in message
news I'm using a text file (data.wp) for the data source files on vaious
word
merge (2003) forms. Lately now only the Administrator can run these
forms
because Word prompts for the Data Source. it's location is in the C
drive
of
the users pc. When I browse to that location and select it a window
appears
with the data. I click ok and I'm asked again for the Data Source.
Permissions on the "data.wp" is open to everyone. I also tried
renaming
the
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?