Pushing Pixels

Computing and Digital Imaging

Pushing Pixels random header image

Entries Tagged as 'SQL'

Tips for returning IDENTITY values from INSERT

January 14th, 2007 · No Comments · ASP2, SQL

There’s a good article by Scott Guthrie here that describes the basics. Just scroll down to Tutorial 5 for the INSERT specific bit - it is pretty straightforward and there is no point my repeating it here.
One point to note, however, and why I wrote this particular post. The key step in getting this working [...]

[Read more →]

Tags:

Determining row counts for all tables in a database

January 11th, 2007 · No Comments · ASP2, SQL

Here is a usful snippet if you want a way to get the number of rows in each table in your database. I use this in an admin-only page of the web application to provide some at-a-glance statistics. It is also really useful in unit tests for checking the correctness of business logic that may [...]

[Read more →]

Tags: