Group:  Microsoft Word ยป microsoft.public.word.docmanagement
Thread: database connection problem with Word 2003 tables

Geek News

database connection problem with Word 2003 tables
Dan 12/30/2008 8:10:53 PM
Using Word 2003. Program written in VB 6. Program opens Word document and
sends the Update Fields command. Has worked fine for years. Recently Word has
opened the Connect to Database dialog box. The computer has System DSN
connections to the correct DB and works fine. Why has the dialog box started
opening? Was there an update/patch to Word that forces the dialog box? can I
create a connection string in the Word Field Code that doesn't use the DSN
and connect directly? Any options in Word itself? Any way to eliminate the
dialog box?

Database is MySQL 5.0.41 Community. I have used the ODBC connector version
3.51.08 and 3.51.12 with the same results.
Re: database connection problem with Word 2003 tables
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 12/30/2008 11:12:27 PM
The main problem with automating Word Mail merge tends to be that you have
to set the registry entry described in

http://support.microsoft.com/kb/825765/en-us

I am not sure why you would suddenly need to look at that possibbility, but
there was an unfortunate "security-related" change to Word a few months ago
that may have a bearing on this.

FWIW if you want an ODBC connection you have to specify a DSN of one kind or
another - Word's OpenDataSource does not seem to accept DSN-less connection
strings that specify the driver name in {Driver name} format. I don't know
if there is currently a viable OLE DB provider for MySQL but even with that,
despite the fact that the connection string can define everything needed to
connect, you still have to specify a suitable external file such as a .odc
file or .udl file in the Name parameter of the OpenDataSource method call.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Dan" <Dan[ at ]discussions.microsoft.com> wrote in message
news:42EE8D7A-4493-4098-B59B-5498488EA5BA[ at ]microsoft.com...
[Quoted Text]
> Using Word 2003. Program written in VB 6. Program opens Word document and
> sends the Update Fields command. Has worked fine for years. Recently Word
> has
> opened the Connect to Database dialog box. The computer has System DSN
> connections to the correct DB and works fine. Why has the dialog box
> started
> opening? Was there an update/patch to Word that forces the dialog box? can
> I
> create a connection string in the Word Field Code that doesn't use the DSN
> and connect directly? Any options in Word itself? Any way to eliminate the
> dialog box?
>
> Database is MySQL 5.0.41 Community. I have used the ODBC connector version
> 3.51.08 and 3.51.12 with the same results.

Re: database connection problem with Word 2003 tables
Dan 12/31/2008 2:31:01 AM
Thanks Peter,

I don't know if that was the problem, but I got it to work correctly again
just before I left work this afternoon. I opened a fresh document, then
inserted a new database field. After I completed the Wizard, I had a
connection string that differed from the old one, and it functioned fine. Who
knows why!

Anyway, it's now working, in fact even better than before, because if it
returns an empty result, there's no longer an alert notice. Even better :)

I will make note of that registry entry. Thanks for the info.

"Peter Jamieson" wrote:

[Quoted Text]
> The main problem with automating Word Mail merge tends to be that you have
> to set the registry entry described in
>
> http://support.microsoft.com/kb/825765/en-us
>
> I am not sure why you would suddenly need to look at that possibbility, but
> there was an unfortunate "security-related" change to Word a few months ago
> that may have a bearing on this.
>
> FWIW if you want an ODBC connection you have to specify a DSN of one kind or
> another - Word's OpenDataSource does not seem to accept DSN-less connection
> strings that specify the driver name in {Driver name} format. I don't know
> if there is currently a viable OLE DB provider for MySQL but even with that,
> despite the fact that the connection string can define everything needed to
> connect, you still have to specify a suitable external file such as a .odc
> file or .udl file in the Name parameter of the OpenDataSource method call.
>
> --
> Peter Jamieson
> http://tips.pjmsn.me.uk
>
> "Dan" <Dan[ at ]discussions.microsoft.com> wrote in message
> news:42EE8D7A-4493-4098-B59B-5498488EA5BA[ at ]microsoft.com...
> > Using Word 2003. Program written in VB 6. Program opens Word document and
> > sends the Update Fields command. Has worked fine for years. Recently Word
> > has
> > opened the Connect to Database dialog box. The computer has System DSN
> > connections to the correct DB and works fine. Why has the dialog box
> > started
> > opening? Was there an update/patch to Word that forces the dialog box? can
> > I
> > create a connection string in the Word Field Code that doesn't use the DSN
> > and connect directly? Any options in Word itself? Any way to eliminate the
> > dialog box?
> >
> > Database is MySQL 5.0.41 Community. I have used the ODBC connector version
> > 3.51.08 and 3.51.12 with the same results.
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net