Just a head'up.
you can do this even if you don't have a US visa.
just tell the US official that u need to land to Canada, they will do some paperwork and re-direct you back to Canada.
My friend did this. his wife and kid didn't have US visa.
Good to know
I did read of someone who went to flagpole (as it is called) and, instead of whatever the usual procedure is, the US customs officer actually marked in his passport that he was refused entry to the US. This angered the guy flagpoling but obviously it didn't really affect his landing at all--since he was able to turn right back to Canada and land with no problems. I can't remember how long ago it was that I read this, but his post gave me the impression that a direct refusal by US customs is not normal procedure if you're just flagpoling. It makes me wonder if his lack of US visa had anything to do with it or not; I wouldn't know, personally.
Couldn't i just drive to my nearest airport (fyi i'm in edmonton) and ask if i can land through the canadian immigration office at the airport?
No, as far as I know you cannot just land at an airport's customs office. That is intended for people coming through from other countries via air. The two options I've mentioned (flagpoling by land or scheduling an appointment with an office inland) are the only two methods I've ever heard of for landing if you're already in Canada. It'd be convenient but I've never once read of it even being an option.