<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d11356004\x26blogName\x3dxception\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://openrent.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://openrent.blogspot.com/\x26vt\x3d-4655156434419967503', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

Connect OpenOffice Calc to A MySQL Database

The following will connect OpenOffice.org Calc 2.0 to a MySQL database. This article is meant as a companion to the article by Mark Wielgus called "Connect Excel to Mysql Database". To begin, follow Mark's directions on downloading and configuring the ODBC driver to access your MySQL database table. We begin at Mark's step 3:

Step Three
Launch Calc. On the main menu click New->Database

This will open the Database Wizard dialog box. Select the "Connect to an existing database" option, and choose MySQL in the drop-down box. Click "Next."

You are now at step 2 of the wizard. Choose the "Connect using ODBC (Open Database Connectivity) option and click "Next."

Now you will choose the ODBC datasource you created earlier. Click the "Browse" button to find it, then click "Next."

You should now be at step 4. Enter the username that has access to the database, and tick the "Password required" checkbox. You should now click the "Test connection" button to test the connectivity to the database. After clicking the button, you will be prompted for the password associated with the database username, like this:






If the connection test was successful, you will see this dialog box:






If you cannot make a succesful connection, verify the grants for the database you are connecting to. Click "Next" and move on to step 4. At this step, uncheck "Open the database for editing" and leave the "Yes, register the database for me radio button checked.

Click the "Finish" button, and you will be prompted to save the database connection as an .odb file: OpenDocument Database. Use any name for the file, and save it. The dialog box should disappear.

Now reopen Calc, and choose View->Data Sources from the menu. This will allow you to view, manipulate, and import data from the database within the Calc application. It should look something like this: