View Single Post
  #3   Report Post  
Bod
 
Posts: n/a
Default

Hi Cindy,

Yes, I am using ODBC to connect as it is the only method I ever learned how
to use, but that seems to explain my problem. Thank you. Perhaps I should
try OLE DB if that is better.

The date problem became quite bizarre as I explored further. I set any
missing dates in the SQL table to 01/01/1900 (to identify them as missing)
and it was this date the Mailmerge did not like. In fact it is any date in
the year 1900! If I set the date to 01/01/1901 or later it formats and
displays correctly.

Thanks again, Bod

"Cindy M -WordMVP-" wrote:

Hi ?B?Qm9k?=,

From the sound of it, you're connecting to SQL using ODBC rather than OLE DB?
Have you tried OLE DB?

The SQL ODBC driver + Word mail merge does not recognize unicode (nvarchar).
And there are also problems with date formats.

If you want to continue to connect in this way, include the date formatting
and field type conversion as part of the View definition.

I am using a SQL Server View (combining fields from 3 tables) as the data
source for a Mailmerge. If a field is defined as nvarchar in the SQL table
it does not appear in the merged document, but if the definition is changed
to varchar it merges correctly. Why is this?

Also a field defined as datetime in the SQL table refuses to accept format
switches -

{MERGEFIELD Tx_Date \@ "dd/mm/yyyy"}
{MERGEFIELD Tx_Date \@ "yyyy.mm.dd"} etc...

Always appears in the document as

04/12/2004 00:00:00

Why is this?

(I'm using Office XP (Word 2002) and SQL Server 2000 if that matters)


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)