using LIKE in MS ACCESS queries

I was getting bizarre results the other day when using LIKE in an ACCESS query – it turns out then when creating a query in SQL view inside Access you need to use * as a wildcard, but from within ASP you use %.

for example:-

SELECT foo FROM Bar WHERE foo LIKE ‘*Bar*’ <– within Access

SELECT foo FROM Bar WHERE foo LIKE ‘%Bar%’ <– from within ASP

returns the same dataset.

archived comments

iam also getting the same error, do you have any final good solution for this, iam searching google for the solution found your page

amin b nagpure 2007-05-22 08:15:56

well what I have written above is the solution to the problem I was having – use * within Access and % within ASP

Rick 2007-05-22 08:34:19

Posted in Uncategorised

learning something new

today I really feel like i’ve learn’t something new. for example at the simple end of things how to cut and paste and tab between applications and windows within applications on a mac (there’s an apple key godammit!), and at the slightly more complicated end of things, how to download and install python libraries/modules on unix, and most excitingly (for my inner geek) how create python test scripts for web apps using mechanize.

Mechanize is a technology that allows you to open web pages within a virtual browser (i.e this all happens in code, you don’t actually see anything), and do things like submit forms, follow links, check the content of tags etc. The idea is to create a set of scripts to perform tasks on a website such as creating an article within a content management system, using the HTML user interface, without needing to actually have a real browser open or someone’s time taken up creating articles called "sdfsdfsfdf" (as test articles are invariably always called).

This means that once the scripts are set up, we can run them intermittently as we work on a project to check whether anything has been broken since the last test.

Posted in Uncategorised

Ashton Court Festival

It was one of those situations where we needed a kick up the ass, one o’ clock on saturday afternoon and my wife and I are losing motivation to walk up to Ashton court because of the grey skies. "But there’s blue sky over there!", one of our friends said. So we reluctantly started walking, and within minutes it was sunny. By the time we reached the festival there wasn’t a cloud in site and so we claimed our pitch near the main stage and enjoyed the festival picnic style, a group of friends getting sunburnt to the distorted sounds of local bands and the taste of beer, entertaining small people, or rather them entertaining us.

Posted in Uncategorised

queuing for what?

so i’m in Sainsburys Central along with 1000 other people buying sandwiches, salads or "be good to yourself" carbohydrate and preservative laden stodge. I usually pay at the cigarette counter as I only have one item and I usually pay cash. Today there is a long queue at the cigarette counter and hardly anyone at the normal tills. why? is there something wrong with the normal tills, should I join the queue for the cigarette counter?

I eventually take the plunge and go for the normal tills – all goes without a hitch and within minutes i’m walking back up the road thinking why didn’t those people just go for the normal tills rather than stand in that long queue? Then it dawned on me – maybe they were buying cigarettes!

As a life-long self-righteous non-smoker it honestly didn’t occur to me that you might use the cigarette counter for anything other than avoiding the checkouts 🙂

Posted in Uncategorised

decaf reaction – should I be worried

Early this morning im my pre-caffeine fog (cf: chicken and egg) I accidentally picked up a decaf coffee pod. Upon realising (phew just in time…), threw it down as if I had been electrocuted – should I worry about that? probably 🙂

Posted in Uncategorised

trying iTunes

I downloaded iTunes yesterday, mainly so I could plunder my bosses music collection. Seems to work pretty well…. how long until I find myself ripping stuff to AAC/M4A rather than MP3 and commit to the de facto hard drive music player that i’m trying to ignore?

Posted in Uncategorised

iframe or not iframe

recently I have noticed loads of skate (or skateish) sites using iframes to display in particular news pages (usually in tiny print). I’m undecided on them. I’ll agree they look good and keep things neat and compact, and i’m considering sticking one or two on this site, maybe for recently updated items and my skate blog. On the other hand they can be a bit fiddly – i’m not convinced they encourage people to read the contents.

I’ve also noticed a lot of people using the word "plethora", sometimes quite unexpectedly and out of context

Posted in Uncategorised