Back to the blog
Recent Posts
-
May 18
A short story about usability
-
Apr 20
Twitter as social computer
-
Apr 03
techAU troubles - techAU.tv complains, new domain is born
-
Mar 30
Announcing the launch of techAU.com.au
-
Mar 27
TechAU repurposed as Aussie tech blogger aggregator
-
Mar 20
Are aggregator sites getting a free ride?
Most Popular Posts
-
Why you should be using a framework
-
Five easy things that make you a better web developer
-
Internet Expletive
-
Where's the Android hype?
About the Blog

I'm a web designer and web application developer in Melbourne, Australia. If you find anything useful, leave me a comment, and if you need web design, development, or accessibility and usability consulting, contact me! Cheers.
Twitter: joshsharp
Posts tagged database:
Quick Poll: Do you abstract your DB functions?
Sunday 28 Oct, 2007
This one has always had me wondering how everyone else did it, so I figured what better way to find out than to put up a quick poll.
So it's fairly straightforward: in your code, do you have a database wrapper class with abstracted functions like query(), or do you call mysql_query() (or equivalent) directly from your code?
Leave a comment below if you're outraged that I even had to ask.
Paging MSSQL results through ODBC: an epic tale
Tuesday 23 Oct, 2007
Now, if you're an open-source developer, you probably break into a sweat whenever working with Microsoft products is mentioned. Apache will always beat IIS and MySQL (or PostgreSQL) will reign supreme over SQL Server, despite those naysayers who worship at the temple of Steve Ballmer (I hear they chant "developers, developers, developers" and dance in religious ecstasy). And so it is with me. I knew that SQL Server had all those extras like stored procedures, user-defined functions and views — which MySQL didn't until recently — but I preferred the non-evil side of the force.
Turns out MySQL offers some little extras after all. Little things like the LIMIT clause, which allows you to define a range of results to be returned. This function is absolutely invaluable in paging data, but... in versions of SQL Server older than 2005, there's just nothing similar. The closest is the TOP clause, which returns the first X amount of rows, but does not allow you to specify a starting index.
What follows is a journey of strength and courage, of overcoming adversity, of sticking with SQL Server even when all seems hopeless. This is the story of attempting to page data returned from SQL Server 2000.
