Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Record 1 contained too few data fields
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 |
#2
|
|||
|
|||
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 :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i check a checkbox based on a fields data | Mailmerge | |||
excel/word merge: why are some data fields partially truncated? | Mailmerge | |||
Specific Email Merge w/ Specific Attachements | Mailmerge | |||
Using excel as a data source, but only getting 63 fields | Mailmerge | |||
posting data from text input fields to fields later in document | Microsoft Word Help |