August 2008

Using SQLite with Eclipse and DbEdit

[Warning: For those not of a technical bent, what follows will be as dull as the dullest, tepid dishwater you can imagine, so probably better to venture to something more interesting.]

SQLite.gifEvery so often, I'll decide to tinker with a bit of code to extend my knowledge and see if I can still knock up anything that'll work on ye olde Interwebby. Inevitably, this involves spending far more time setting up an environment than actually producing anything.

As I tend not to make notes (v. bad habit, I know) and then forget how it worked, I've resolved to write up little blog posts as an aide memoire for the next time. If they help someone else in the same predicament, marvellous. The steps below worked for me, but it's always a bit of a gamble that the process is actually what you're supposed to do.

So, after much time spent with Mr Google, a number of dead ends and some very useful posts, this is how I managed to get my setup (Mac OSX, Eclipse, DbEdit, SQLite) working. If you've spotted errors, or have any suggestions, please feel free to leave a comment.

Step One - Download JDBC Drivers

Firstly, you'll need to find and install a JDBC driver for SQLite. The one on the Zentus website did the trick:

Save the sqlitejdbc-v053.jar to a memorable directory, I created a jdbc drivers folder in the Eclipse application folder. Just remember where it's saved.

Step Two - Install JDBC Driver in DbEdit

Fire up Eclipse and open the DbEdit perspective using the menu:

Windows > Open Perspective > Other... > DbEdit

DbEdit provides the option to install new JDBC database drivers when you create a new database connection, which is step three:

Step Three - Install Create SQLite Java Database Driver

  1. Select the Connection option from the main menu bar at the top of the page, a dialog box will pop up
  2. Give your new connection a name e.g. SQLite DB
  3. Click on the drop down for JDBC Driver field, if an SQLite driver is available, select it and skip to step four below
  4. OK, so you need to install the SQLite driver downloaded above, click on the Classpath tab in the dialog box
  5. Click on the Add Archive option. Find the driver you saved in that directory and click OK, then click Apply.

Step Four - Create Database Connection

This is where things got painful for me. The format for the JDBC Server was a right little sod. Thanks to the clues on this page, I finally figured it out.

  1. If you're following the step above, switch back to the Common tab in the dialog box by clicking it
  2. Select the SQLite JDBC driver, if you've used the one above, it'll read org.SQLite.JDBC
  3. Now, you'll need to enter the Server URL, which will take one of the formats listed below
  4. Click OK. There might be a prompt for username/password, I'm not using one so could click OK.

Possible format for JDBC SQLite Server URL:

jdbc:sqlite://dirA/dirB/dbfile
jdbc:sqlite:/DRIVE:/dirA/dirB/dbfile
jdbc:sqlite:///COMPUTERNAME/shareA/dirB/dbfile

As an example, on the Mac that I'm using the format of the URL was:

jdbc:sqlite://Users/myuser/Sites/test/test.sqlite

which is the full path to the SQLite file. I haven't tested it, but on a Windows machine, it would most likely be:

jdbc:sqlite:/DRIVE:/dirA/dirB/dbfile

which in a real-world example, might look like this (N.B. I haven't tested this):

jdbc:sqlite:/C:/Documents and Settings/Sam/Sites/Test/test.db

I hope this is useful for anyone else who is sitting at their computer barely the resisting the temptation to throw it out the window.

2 comments

Pimp my SXSW

SXSW Interactive 2009If you're not familiar with the annual mass geekery that is South by South West Interactive or SXSWi to its friends, you may be more familiar its big brother, the huge music festival which takes over Austin, Texas. Think Glastonbury without the mud, much better accommodation and plentiful Tex-Mex and BBQ.

There's a growing British presence at the festival and the BBC now covers the music side of things in-depth on telly and radio. The digital side of things has been something of an pilgrimage for the Brits in the know, but the last couple of years have seen it go much more mainstream.

You could call it an underground festival-cum-conference, but with something like 10,000 delegates to the interactive conference alone, that's not really doing it justice. Each year, the organiser's of SXSWi invite panel submissions, which are then voted on by the public. It's one of the more democratic conference organisations, although there's still an advisory board and their in-house experts who have a big say in what happens.

This year, I've had a hand in putting forward three possible panels/sessions, and begging your indulgence, if you fancy adding your vote for any of the panels, it'd be much appreciated. You have to register, but it's dead simple.

SXSW Interactive 2009 Panel PickerWeb 2.0 Too Much Or Not Enough?
Five years ago Tim O’Reilly coined Web 2.0. Unquestionable innovation and the dramatic changes in online behaviour, but what’s the economic truth? A damp squib with the same players dominating or are the true changes still to come? And Web 3.0? A meaningful iteration or academic navel gazing?

SXSW Interactive 2009 Panel PickerMy Ten Biggest Blunders: Adventures in Business
Midnight RAM raids, bailiff stand-offs, disappearing developers, spreadsheet snafus and cleaning-lady server outages. All real-life horrors from web veteran, Sam Michel. Join him on this humorous journey on the road to catharsis. Feel his pain, learn from his mistakes and indulge in some entrepreneurial group therapy.

SXSW Interactive 2009 Panel PickerThe Dark Side of Social Media
Despite the hype there are downsides to social media - virtual problems are invading our real lives, or is it vice versa? Identity theft, scurrilous accusations, scams, stalking and bullying. Social media where open debate prevails has a dark side. What can be done about it?

There's also a much longer listing of all the panels from British digital companies that I wrote up on my official work blog at Chinwag, including a few choice cuts that piqued my sleepy interest as I was trolling through the list of 1,300 in the early hours of the morning!

Add a comment

Banksy's Big Easy

Banksy? - Holland Park Roundabout, LondonDespite early reservations and lots of general waffle, Twitter does turn up some gems. From wry comments on the US political collection to tip-offs about the latest Banksy sightings.

The latest batch hot off the street come from New Orleans taken by jonnodotcom. Compare the pic on the left I snapped at Holland Park roundabout in West London, compared to his latest offerings from the Big Easy.

Just me or does the tragedy that happened there make those images that much more poignant. My favourite is "No Loitering", what's yours?

www.flickr.com
Add a comment

Stop SHOUTING at me

251592918_0ace710020_m.jpgI've noticed that since the introduction of a second DVR (why don't TiVo come back to the UK, sniff) into our household, the amount of TV advertising that I'm exposed to has dropped significantly. Fast forward button, you are my friend, I thank you.

However, when I do watch live TV, the adverts now drive me up the bleedin' wall. Many are terrible, but there some works of marketing art. So, why the annoyance? The VOLUME. They're so loud and apparently getting louder. Although regulatory body, Advertising Standards Authority have limits which they sometimes impose on how loud the ads can be, I find myself reaching for the volume control every ad break.

I hear from a well-informed source that the TV companies are asking for shows to be made quieter, so that the adverts still SHOUT at you during the break. And it's not just me and my delicate lug holes that don't like it.

One word: shhh.

And the regulators agree.

If I wanted to buy everything from people that shout at me, I'd shop exclusively from Evening Standard vendors.

[Pic: courtesy of hebedesign]

Add a comment

Corporate Gobbledygook

22373.JPGAs I was writing the post about phrases from baseball becoming a part of everyday office jargon, a Sunday evening TV stalwart flashed back into memory. The master of corporate gibberish was Gus Hedges from Channel 4's Drop the Dead Donkey. Played to perfection by Robert Duncan who gave life to Andy Hamilton and Guy Jenkin's poke at 80s yuppie corporate flannel.

Sadly the copyright void that is YouTube doesn't have any clips of Gus, so you'll have to make do with the written form. Spot any favourites?

Just so you know, I'll be stir-frying some ideas round my think-wok first thing Monday morning. Enjoy...

  • All right Team are we achieving megathrust? Ace!
  • Anyway, heads down, chins up, chests out, teriffic, well played team.
  • Are we nuking the opposition news busters? Teriffic.
  • Are we sniffing round the bottoms of the opposition?
  • Aye aye coach, had a good weekend recharging the batteries for another surge of powerhouse info-dynamics?
  • Coach, if I could input into your mental mainframe for a moment...
  • Could we interlock brain spaces in my work area?
  • From now on I'm going to employ relaxation techniques to turn off stress river and mosey gently down contentment creek.
  • George, can we pool our brain spaces into a centre of excellence?
  • Good morning newsbusters, are we cooking with napalm today? You bet!
  • Good morning scoop busters!
  • Good morning teamsters!
  • Helen we need a rapid interface in the chin-wag department.
  • Helen, if I could just park in your mental multi-storey a moment...
  • Henry, television is no longer corner store it's a hyper-mega-market. And if we want Connie Consumer to slip her hand into the freezer cabinet and pull us out, we have to be the frozen peas with the nice picture on the front and the 10% off coupon.
  • Henry, welcome to my humble living space.
  • However, the fickle hand of Mr Fate has spun the coin of destiny.
  • I feel a very real sense that we ought to be wary of running any unsubstansiated stories if we're to avoid a faeces and fan situation.
  • I see myself as a sort of hands off overview executive who sits at the sharp end and interacts within the office matrix...
  • I think we have a slight togetherness shortfall here.
  • I'd just like you to stir-fry something in my think-wok.
  • If Mrs Whitehouse saw this, she'd have our collective danglies in a Magi-Mix.
  • I'm a committed anti-tittle-tattle person.
  • I'm in major cellular rejuvination mode, fast tracking my way to eternal biological viability.
  • I'm not here.
  • I'm reading this great new book on the benifits of reciprocal social intergrational relationships within the work environment. ("He means 'having friends")
  • I'm setting you free! Free to rome the high seas of enterprise as the buccaneers of our broadcasting future!
  • It's an anti verminous defecation deterrent. ("It's to stop pigeons crapping on the building")
  • I've never been at a burial scenario before.
  • Jill, could you come for a brief scuba in my think tank?
  • Just a thought I wanted to pop into your fishbowl to see if it blows bubbles.
  • Lady Merchant's just arrived, so no drops in the clanger department.
  • Let's keep kneecapping the opposition.
  • Let's opperate a zipped-lip scenario on this one.
  • Let's stress how Tony (Blair)'s got a superb raft of ideas, several rafts in fact, which he's lashed together into a pontoon of excellence!
  • Look out Mummy, the snake wants a reproductive interface.
  • Look, Henry, if it's any help, I do have a sleep area over capacity situation.
  • Morning hotshots! Are we cooking with napalm? You bet!
  • Morning newsdiggers! Have we struck gold this morning?
  • Morning ratings busters! Are we scraping Pete Punter with sexy scoops? You bet!
  • Morning talent base! Are the afterburners on full thrust? You bet!
  • Morning, mountaineers. Climbing the north face of newsmaking again are we? Teriffic!
  • My place is here, with my family of co-acheivers!
  • Problems are just the pregnant mothers of solutions.
  • Quality stress diserpation opportunities here.
  • Sorry, Helen, had a bit of a composure shortfall earlier.
  • The three of us can go back and get into some real pro active recreational interfacing...
  • There is just something I'd like to pop into your perculator, see if it comes out brown.
  • Today is tomorrow's tadpole of opportunity.
  • We all need to go on a forgivness curve.
  • We do rather appear to have an ongoing underwear entanglement situation...
  • Well, butt-kickers, what's cooking?
  • We're merely running our bulletins through the cappucino machine of innovation, see if it comes out frothy.
  • We've got to downsize our sloppiness overload.
  • What stories are we scorching the opposition with today?
  • What's filling today's scoop sandwich chief?
  • Yes, Alice is indeed now occupationally challenged.
  • Yes, well, I sense we may be straying down tangent boulevard here.
  • Yes, well, obviously I don't have an opinion, I'm a support module, but it would be very easy to fnd ourselves standing on buttered ball bearings over this piece.
  • Yes, well, publicity-wise this is a rather regrettable gonads in the guilotine situation.
  • You see, when it comes to sexual interfacing with the female gender group, I've always been caution-orientated due to ongoing problems of an adaptive nature regarding the gooiness factor on the physical front.

Thanks to Hazey, Shaolin_Monkey and h2g2 for the quotes. If anyone's got more, do let me know and I'll add them or leave a comment below. Thanks.


Add a comment

The A to Baseball of Business Jargon

15239014_a76211d798_m.jpgAfter a hefty amount of procrastination this Sunday, who knew washing up could be such an engaging pastime, I got down to some heavy-duty email inbox clearance. To while away the hours and stem the rising panic of hundreds of unanswered emails, I delved into the calming, erudite and other- worldliness that is BBC Radio 4's, From Our Own Correspondent podcast.

Alongside the whimsical insights into the lives of others around the world, was a piece by Kevin Connolly about baseball. Now, I'm a cricket fan with a proud record of attending all the Twenty20 Cup Finals. OK, maybe a fair-weather fan, so shoot me, it helps me relax, as does the day-long refreshment that such events require. And I like baseball, too, despite only having managed one match so far.

192330769_1cd335df5f_m.jpgHowever, the prospect of a rather special second match looms. After the excitement of the Digital Mission to NYC that Chinwag is running in mid-September, a trip is lined up to take in the penultimate Yankee game at Yankee stadium. Looking forward to it? You betcha.

So, baseball. A bit like rounders? A gauche version of cricket?

Well, yes, perhaps, but did you realise how much baseball has affected the day-to-day business jargon? As Kevin points out in the podcast, check out how the workplace lexicon owes more than a passing debt to the diamond:

  • Taking a "baseline position"
  • Prudent folks are "Covering all the bases"
  • Getting to "second or even third base" (ok, less business, probably)
  • Surprising ideas come from "left field"
  • Wacky suggestions are "off the wall"
  • Ideas are "pitched"
  • If there's a delay, why not take a "rain check"

Who knew? And there's probably more besides. Consider the comparison with cricket. There's certainly been times when a "sticky wicket" has made life difficult, and I often claim to be "stumped" and sadly, being "bowled over" is an all-too-rare event, unless I'm really getting carried away.

The big daddy boss of the workplace phrase, often motivational, never intentional, is Gus Hedges from Drop the Dead Donkey. Sadly, Mr Google wasn't much help in finding a comprehensive list of his (well, the writer's) mastery. If I get a chance I'll try and compile a list, those that remember the show will know what I mean.

Update: I got slightly obsessed and dug up as many posts as I could. For your delectation, I present the corporate stylings of Gus Hedges. Let me know if you spot any more or leave a comment below.

[Pics: courtesy of wallyg and jeffreyputnam]

Add a comment