We are trying to allow someone to use MicroSoft Word on their computer to update the MySQL databasse on a remote server. Nothing is working. Any idea what we need to do to accomplish this. Thanks for your help in advance.
I haven't heard of using a word processor to update a database. If it can be done at all, it's probably through ODBC so you could start looking there. That's how Excel and Access would connect to MySQL.
You can use OpenOffice.org (including its Writer module, similar to MS Word) to communicate with MySQL via ODBC/JDBC, running SQL queries and importing data.
Thanks Tony. We believe using an ODBC/JDBC connector is the answer but we don't know how to use it. Can you give us some sample code or scripts. We could not find any answers on the internet. Thanks
To set up a MYSQL ODBC connection in Windows, you first need to install the MySQL ODBC Connector, available free from the MySQL site. Then you use the appropriate Control Panel applet to set up the connection. It's called something like "Data Sources (ODBC)".
In that dialogue, you need to set up a System DSN using the MySQL driver, giving it a name of your choice, and specifying the server hostname/address, username/password, and default database to be used. Then you can test the connection before finishing.
Word and OO Writer (and others) can use ODBC to import SQL data, such as for a mail merge. I still think you're barking up the wrong tree for updating the database, though.
It depends what you mean by "updating from MS Word". I haven't used MS Office for a few years so I don't know what it offers. I do know that in any OpenOffice module, you can open a "data sources" window, select a data source, "open" a table, and edit it in-place by copying data from the open document, or running SQL update queries. As to whether MS Word offers anything equivalent, I would accept the opinions of the other posters who seem to suggest that it hasn't. There may also be the possibility of writing macros to do the job, but that's a subject for a different forum.
Although it may be just barely possible to give Word the ability to update MySQL records, doing so would require massively complicated VBA code.
It is simply a fact that trying to use Word for updating a database is like trying to use a screwdriver to drive a nail -- it can be done, but it is strongly counter-recommended, as there are vastly superior tools for the purpose.
If you have to use a Microsoft product to update these records, Access is the appropriate tool. Whereas Word will require hundreds if not thousands of lines of VBA code to do what you want, Access can do it easily with little if any coding.
If you goal is simply to update the records, there are many free products out there that can allow you to do this, published by several groups.
Thanks everyone. Can you point us in the direction to get the complicated VBA code because it is highly desirable to use Word for our end users. However, our backend has been MySQL for 20 plus years. We cannot change it at this point.
That code (if it's even possible to do what you want) will be sufficiently complicated that you will nearly certainly need to hire a VBA programmer to write it for you. It's unlikely you'll find such a beast prewritten anywhere -- at least, I've never heard of it.
Again, I strongly recommend your using another product to maintain your database updates.
are you certain that you are using MySQL? maybe using Microsoft SQL Server? i'm having a really really hard time believing that MySQL has been around since 1986
okay, you've been running mysql for 8 years, without needing to update it via Word in all that time, and you suddenly want to start now?
also, you mentioned in your first post that "someone" wanted to do this -- i think you should go back to that person and tell them they can only update the remote database with a product that can actually do it, like, say, the mysql query browser
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.