Monthly Archives: April 2009

Can I Has Layout?

Just got bitten by the IE7 (or IE8 “compatability view”) has layout bug yet again, so posting it…

Basically, in the IE7/IE8cv you can only check .clientHeight on elements where hasLayout==true. If your clientHeight is always returning 0, chances are you don’t have layout. The easiest way to get layout? Set display=”inline-block”. Per:

And that article points to this one, which is pretty much the definitive source (top Google hit!):

height:1% is what I ended up using to make a resizable div “hasLayout.”

display: inline-block makes the div not size to the window horizontally, which didn’t work for my purpose.

I tried using overflow:hidden, but that doesn’t help in IE6.

Stored Procedure to Generate INSERT Statements for All Table Rows Under SQL Server 2005

If you need to create a “data dump” for Microsoft SQL Server, here’s a good free tool:

The one thing I haven’t gotten working is any way to automatically add the “SET INDENTITY_INSERT ON/OFF” statements bracketing a table which contains an identity when not using the @ommit_identity = 1 switch. It might be in the comments, I just didn’t dig through it.

I’ll attach them in case that page ever goes away.

SQL 2000 Version

SQL 2005 Version