MailMerge API Trouble

B

bpmhanson

Hello All,

I have a question about MailMerge from within an api call. I have
word doc set up using the mailmerge wizard that creates an SQL
Server .odc file to use as a datasource. I am calling the
OpenDataSource method (o1.ActiveDocument.MailMerge.OpenDataSource(...)
via a PowerBuilder app. All is well. However, I have one client that
is getting DB errors when trying to run.

The .odc connection is pointing to a view that has public
permissions. Looking at the SQL trace, there is an exec sp_cursoropen
line containing a select statement from the view. Followed by an exec
sp_cursorfetch. Followed by an exec sp_cursorclose. Then a couple of
BatchCompleted lines. All is well.

Then these several lines repeat (within the trace) and I get an error
after the second exec sp_cursorclose 180150000. The errors are Error:
208, Severity: 16, State: 1 followed by Error: 16945, Severity: 16,
State: 1.

Digging through posts on these errors, I see that 208 is roughly 'file
not found' and 16945 is trouble with the cursor.

Why might the first time through these statements be OK and the second
time produce errors? I am running SQL Server 2000 sp4, my client is
running 2000 sp3. I am on Word 2003 sp2, the client is on word 2002
sp3.

I cannot recreate these errors in my environment, but the client has
sent me his traces and I see where (but not why) the error is
occuring.

Any ideas?

Thanks in advance,
Brian
 
P

Peter Jamieson

Looks like a tricky one...

Does your client have Excel, and if so, can they try using the same .odc as
a data source from Excel? (And can they connect manually from Word 2002?

Are any of the other clients with no connectivity problems also using Word
2002, or are they all Word 2003 users?

Peter Jamieson
 
P

Peter Jamieson

(Or if you can double-click on the .odc and see records displayed as a
result, it may be possible to do this test without Excel)

Peter Jamieson
 
B

bpmhanson

(Or if you can double-click on the .odc and see records displayed as a
result, it may be possible to do this test without Excel)










- Show quoted text -

Peter,

Thanks for your responses.

I have not tried the Excel approach, however the .odc and running the
merge directly from Word both produce results. Unfortunately, info on
other clients that may be running Word 2002 is not readily available.

I was able to get the client DB and exact software build, with the
only difference being me using Word 2003 and it worked fine. That
leads me to the api. So, we pushed back to the client to upgrade
Word. We'll see how they respond and if that infact will fix the
problem.

Thank you for your efforts, and you're right, it is a tricky one.

-Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top