I'm trying to perform a mail merge to a SQL Server 2005 view. I created the same view twice, once without specifying the schema (ie. DBO), and once with specifying the schema. In SQL Server Management Studio, logged in using Windows authentication, I have no problem accessing both views.
Using the "Select Recipients" > "Use Existing List" option in Word 2012, I made a connection to the database server using Windows authentication. Both views are included in the list of available tables, as shown below.
Following through, I created a connection for each view. I am able to successfully merge from the view owned by "dbo". I cannot however merge from the view owned by "Permit". I receive the following error.
The only difference that I know of is that the successful one uses the default "dbo" schema, while the other uses "Permit". Is there an extra step to ensure the schema information is used when merging? How do I do a mail merge off a table or view not owned by "dbo"?
I did some additional testing. Looking at the ODC file used to define the connection, I see that the schema information is properly recorded.
For testing, I renamed the ODC file to an HTM file, and opened it in Internet Explorer. It displayed the live data from the database without an issue.
I then tried doing the mail merge while listening with SQL Server Profiler, just to see what queries Word was trying to run.
As I suspected, Word 2010 is not using the schema information when mail merging.