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
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