Access97->Word97 merge, buffer overflow? 
Author Message
 Access97->Word97 merge, buffer overflow?


I have an Access97 front end hooked to a SQL database.  In the front
end DB I have a Visual Basic function that takes a unique key id, does
a select and concatenates the several resulting rows together into one
long string.  I use that function in a query that was specifically
designed to go to a Word merge.

When I open the query the information is returned fine and I can see it
in the Access table view.  When I merge to a Word document, if the
string returned from the function is larger than (surprise!) 256
characters from the 256th character on the contents of the start of the
field is repeated.

For example (imagine the magic number is 10 instead of 256)

The returned string should be "John Jacob Jones"
In Word it appears as

        John JacobJohn Jacob Jones

This is playing havoc with our application.  Does anyone have a
suggestion?  I have the Office97 service release installed.

I've tried changing the return type of the VBA function from String to

The funny thing is that I have a field of Memo type that is a lot
longer than 256 characters and it merges to Word just fine.  Can I
force the return type of the function to something else?

| Charles R. (C. R.) Oldham     | NCA Commission on Schools        |

| V:602/965-8700 F:602/965-9423 | Tempe, AZ 85287-3011           _ |
| "I like it!"--Citizen G'Kar   | #include <disclaimer.h>       X_>|

Tue, 27 Jun 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Access97-Word97 Mail Merge

2. Mail Merge access97 with word97 (Blank spaces)

3. Word97 -> Access97

4. connecting Word97 <----> Access97

5. Word97 -> Access97

6. Word97 document -> Access97 records

7. Socket problem (buffer overflow?)

8. comm-buffer overflow

9. How can I prevent a communications buffer overflow?

10. Buffer overflow

11. Keyboard Buffer Overflow Question

12. Help with Byte buffers and stack overflows


Powered by phpBB® Forum Software