Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2005

Tip: Looking for answers? Try searching our database.

Record 1 contained too few data fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HJ - 12 May 2005 13:30 GMT
I have set up a User DSN called PCI that uses the Microsoft Access Driver
and connects to a user database (.mdb) and a custom system database (.mdw).

I have used Microsoft Word to create a new .odc file (with +Connect to New
Data Source) to connect to a query called qryWord and this connection works
well.

Then I have set up a mail merge document that uses this .odc file. The data
link properties are set correctly and when I test the connection the result
is OK: "Test connection succeeded."

But when I close the Data Link Properties dialog box error messages are
being displayed: "Record 1 contained too few data fields." and "Record 2
contained too few data fields.".

In my test database the query qryWord returns three (3) records. That leads
me to the conclusion that the first record is considered a header row. And
since some fields in the first record are empty, there is a mismatch of the
number of header 'names' and the number of fields per record.

As a test I have exported the query results to a comma separated file (.csv)
with the use of a first row with field names; that file was merged with
correctly. If I do not include the first row with field names, the file is
not merged correctly.

Therefor I am looking for a solution to have the first row in my query not
be considered a header row by the .odc connection or by the User DSN (I do
not know which one is responsible for this). How do I do that?

Thanks in advance,

HJ
Cindy M  -WordMVP- - 20 May 2005 14:09 GMT
Hi Hj,

> I have set up a User DSN called PCI that uses the Microsoft Access Driver
> and connects to a user database (.mdb) and a custom system database (.mdw).
>  
> I have used Microsoft Word to create a new .odc file (with +Connect to New
> Data Source) to connect to a query called qryWord and this connection works
> well.

Why not just connect directly using ODBC, and leave the (faulty) OLE DB part
out of this? Activate "Confirm conversions on open" in Tools/Options/General.
Now you can select ODBC as the connection method. In order to see your query
in the list, click "Options" and activate "Views".

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 :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.