MYSQL & ODBC Connections, Revisited
So we thought we had our databsae problem licked. (See MYSQL & ODBC Connections)
After setting the primary key we tested the database and were able to connect, access the tables and edit the data. Perfect.
I installed the connector on each of the six workstations. Four of these stations were read only and worked properly. Two of the workstations required write access and this is where we came into trouble again. Everything in the Grant tables and privileges was set correctly. We could edit through the web interface and at the command line. After many hours of frustration and Googling we decided that something had to be wrong with the ODBC connector. Our solution came in the form of the JDBC connector.
If you are having problems with MYSQL and Openoffice Base where you cannot edit the tables, maybe this will help.
- Download the latest version of JDBC. As of this date the latest version is 5.0. We used the Source and Binaries (zip) file.
- Unzip the jar file onto the C: drive. If you are going to be using a program other than Openoffice you will have to set the CLASSPATH in the Windows environment variables. To avoid compatability issues, I chose to install Openoffice with JRE included. I highly recommend going this route and the next step assumes that you did also.
- Go to one of the Openoffice programs such as calc or writer. Select Tools -> Options. When the Options window opens click on Java. After a few seconds you will see all of the JRE’s that are installed on your system.
- Make sure that the checkbox for Use a Java Run Time Environment is checked.
- Click on the button for Class Path. When the Class Path window opens click on the Add Archive button. Browse to your jar file on C:, click on it and hit Open.
With that accomplished you can exit out of whatever Openoffice program you are in and open up Base. This will get you to the Database Wizard which will walk you through connecting to the database. Here we go:
- Click on Connect to an Existing Database. From the drop down menu select MYSQL. Click Next.
- Choose Connect Using JDBC. Click Next.
- Fill in the information for Database Name and Server URL. Click Test Class. If all goes well a box will pop-up telling you that the JDBC driver was loaded successfully. Click OK and then Next.
- The next screen will ask for the User Name for the databse. Check the Password Required box if a password is required. Click Test Connection. Again, if all goes well, a box will open up telling you the connection was successful. Click OK and Finish. You will now be asked to save the database. Once it is saved Base will open your database.
- Click on Tables. If a password is required a box will open asking you to enter it. In the Tables window you will see the available databse tables. Double click on the name and it will open.
More on using the Openoffice Base when I figure that out.
End of the Year Madness
It is morning on Friday, January the 5th of the new year, 2007. I am sitting in the living room drinking coffee and looking out the window at the fresh blanket of much needed snow. The frantic urgency of the holidays has gone and life has once again returned to its normal pace. Hallelujah!
Don’t get me wrong, I enjoy the holidays. Thanksgiving has always been a wonderful day full of good food and friends. Some years there can be over 20 guests coming and going throughout the day or there may be only a few of us as was the case this year. So far Thanksgiving has not been ruined by the commercialism and marketing that has so distorted Christmas. In fact, it is practically passed over by the entire Christmas season which, it seems, begins as soon as November 1st. Even though we live in a remote area without shopping malls, the local stores already have Christmas decorations in place before the first turkey arrives at the grocery store.

I began decorating the house on the second weekend after Thanksgiving. It’s quite a project and the decorations seem to get more elaborate each year. In order to get into the spirit of things I get a random selection of Christmas carols playing on the stereo and dig in. First, the boxes of ornaments, garland and the tree (yes, it’s fake) have to be excavated out of the shed and dragged inside. Then the living room has to get rearranged to make space for the Christmas tree. This usually involves finding new locations for a dozen or so plants. Once this is accomplished the tree has to be assembled and ‘fluffed’. Our tree is a tabletop version and only stands about 4′ tall and it gets filled up with a lot of stuff. Out of curiosity I took count of all the tree trimmings and this is what I came up with: 81 different ornaments, 1 dozen icicles, 3 strands of multi-colored lights, 2 strands of bubble lights, 2 strands of candle stick lights, a couple of ropes of shiny beads, approximately 2 dozen red velvet bows, and a star to top it all off. As Elvis serenaded me with”Blue Christmas” in the background, I threw a velvet skirt around the base of the tree and voila’, a new hideout for the cat. A couple of glasses of wine are usually required to accomplish this feat.

Once the tree is finished, I moved on to set up the Dickensian Christmas village, complete with little Victorian villagers which the cat winds up batting around the living room. Each one of the buildings has its own light bulb and electrical cord, however, unlike the tree lights, these cords don’t plug into each other thus requiring two power strips and a couple of extension cords. Add in a timer for everything to turn on and off at the same time and its a wonder the house doesn’t burn down in an electrical fire. Meanwhile, the Muppets and John Denver had taken over and the first bottle of wine was consumed. Next came the hanging of the lighted wreath in one of the windows, which required yet another extension cord that somehow had to get plugged into the afore mentioned timer. Finally, the stair banister got decked out in garland with dancing multi-colored lights, strands of shiny beads, dangling snowflakes, more bows and another extension cord and timer. Running up and down the stairs was thirsty work and another bottle of wine was uncorked.
With the end almost in sight all that remained was some tidying. The empty boxes got stashed back out to the shed and fake pine needles were vaccuumed up. It was now well into the evening and a cozy fire crackled in the wood stove. All of the lights save for the Christmas lights were turned off. A final glass of wine was poured as Booker T’s Christmas album came on. I felt like an exhausted but very merry holiday elf as I sat back, enjoyed my handiwork and awaited Christmas day. This Christmas we enjoyed the company of a few friends and family as we all sat down to a fine meal of baked ham and washed it down with a seemingly endless supply of wine. Merry Christmas, ho-ho-ho and thank goodness that holiday was over. The next and last festivity that had to be attended to for the year was New Year’s Eve. Phrog and I rang in 2007 together with a couple of bottles of champagne. We don’t have TV and couldn’t be bothered with finding a webcast, so we actually missed midnight and ended up toasting around a quarter after, but after two bottles of champagne who gives a shit? Now it is a few days into the new year and I am in the process of taking down the decorations. The living room has been returned back to pre-holiday normalcy, however, there is still the garland around the front door to deal with. Oh well, maybe I’ll get to it by the end of ski season.
MYSQL & ODBC Connections
A client needed to have all of his employees be able to access a company database containing client and job information. He originally wanted us to purchase and install Microsoft Access. This would have cost approximately $1600 by the time all of the software and licenses were purchased. Instead we offered to find an alternate solution using Open Office witha MYSQL database. Long story short, we could connect to the databse but not edit the tables. After trying multiple connections with no luck, we tabled the project thinking that there must be a bug in the system.
Today we downloaded the latest version of the connector:
http://dev.mysql.com/downloads/connector/odbc/3.51.html
Unfortunately, we encountered the same problem as before. We can connect to the database, see the information, but cannot edit the tables.
Since I have absolutely no knowledge about these databses or connectors, however, I am a decent Googler. Here’s what I found at this wonderful site:
http://dba.openoffice.org/FAQ/specific.html#editmysqltable
I cannot edit a newly created table!
The first reason may be that the table was created without a primary key or a unique index. In this case open the table design for that specific table and select the columns which identify a row uniquely, open the context menu and select the entry “Primary key” and save the table. After that the table should be editable.Second reason, the table privileges are not set right. This is the case when the table “Mysql.tables_priv” doesn’t contain the right privileges. To verify this, open a new query design and insert in the text view the statement “SELECT * FROM mysql.tables_priv” and switch the mode to native in toolbar. When executing this statement, you should see your table name with the necessary privileges. If your table name doesn’t appear in this list, you have to grant yourself the privileges. This isn’t done automatically. Open the context menu upon your tables entry on the left side in your data source browser and choose SQL. In the appearing window insert “GRANT ALL ON yourtablename TO yourusername” (find more about the GRANT syntax at the MySQL documentation site) and execute this statement. Now your table should be editable.
If you’re connecting to MySQL via JDBC, the useHostsInPrivileges=false option in the connection URL may be worth additional consideration. It tells MySQL to ignore the host which you are connecting from, when calculating your privileges.Third reason, your driver which you are using isn’t up to date. In earlier releases of MyODBC we recognize that the privileges and the currently username are not correctly returned.
The very first reason was our Eureka! moment.
The Mystery of the Daytime Idle: Why aren’t you working?
Who are these people? I used to wonder the same thing as I worked away at a job from 9-5, Monday thru Friday. Some were tourists, but what about the rest of them?
read more | digg story
Mountain Biking: Day 2
My first day of bike riding may have kicked my ass, however, I was determined to do better. Today was a success. I made it to 131 and back with the barest minimum of whining. The gear shifting went much smoother and I was able to pedal my way up the hills. The best part of the ride was that I didn’t feel like crap afterwards. In fact, I even tried for a second go at it, but that was a bit much.
A huge thank you goes out to my wonderful phrog for being so patient and cheering me on.



