<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>John's Technology Blog</title>
<link>http://www.blog.johnavis.com/</link>
<description>My blog including my Classic ASP tips and tricks, sample scripts, and applications, plus JavaScript; and my experiences with buying and selling on eBay and using PayPal.</description>
<item>
<title>Classic ASP Master Pages</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=456</link>
<description>When developing websites most of them have common elements like headers, footers and navigational menus that are common throughout the site. In Classic ASP we mostly use multiple server side includes to accomplish this. I like ASP.NET master pages and this page details the technique I use to achieve something similar in Classic ASP.&lt;br&gt;&lt;br&gt;My technique involves creating a master page ASP file which has all the common elements. Where ever I want content to be added I add a call to a sub routine.&lt;br&gt;&lt;br&gt;Then in my content pages when I want the master page content to be added I include it at that point. I then create a sub routine for each content area and put my content inside these. You can have as many content sub routines as required but they must exist in every content page that uses that master page.&lt;br&gt;&lt;br&gt;The following example shows a master page and content page with two content areas: one inside the head tag (called HeadPlaceHolder in this example) so I can easily add title and meta tags, and add JavaScript and CSS within the head tag if required; and one inside the body tag between the header and footer (called ContentPlaceHolder in this example).&lt;br&gt;&lt;br&gt;Any ASP variables that are needed by more than one content area should be created outside of the sub routines.&lt;br&gt;&lt;br&gt;&lt;b&gt;masperpage.asp&lt;/b&gt;&lt;br&gt;&lt;br&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;br&gt;&amp;lt;head&amp;gt;&lt;br&gt;	&amp;lt;% Call HeadPlaceHolder() %&amp;gt;&lt;br&gt;	&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;stylesheet.css&quot; /&amp;gt;&lt;br&gt;	&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/java.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;&amp;lt;/head&amp;gt;&lt;br&gt;&amp;lt;body&amp;gt;&lt;br&gt;		&amp;lt;div id=&quot;header&quot;&amp;gt;&lt;br&gt;			Logo etc etc&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;div id=&quot;content&quot;&amp;gt;&lt;br&gt;			&amp;lt;% Call ContentPlaceHolder() %&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;div id=&quot;footer&quot;&amp;gt;&lt;br&gt;			Copyright etc etc&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;content-page.asp&lt;/b&gt;&lt;br&gt;&lt;br&gt;&amp;lt;%&lt;br&gt;'Any ASP variables that are needed by multiple contenbt areas should be declared&lt;br&gt;'outside of the sub routines&lt;br&gt;'It's a good practice to keep your ASP script at the beginning of your pages anyway&lt;br&gt;%&amp;gt;&lt;br&gt;&amp;lt;!--#include virtual=&quot;masterpage.asp&quot;--&amp;gt;&lt;br&gt;&amp;lt;% Sub HeadPlaceHolder() %&amp;gt;&lt;br&gt;&lt;br&gt;	&amp;lt;title&amp;gt;My page title&amp;lt;/title&amp;gt;&lt;br&gt;	&amp;lt;meta content=&quot;My meta description&quot; name=&quot;description&quot; /&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;% End Sub %&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;% Sub ContentPlaceHolder() %&amp;gt;&lt;br&gt;&lt;br&gt;	&amp;lt;p&amp;gt;My page content goes here&amp;lt;/p&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;% End Sub %&amp;gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=456&amp;comments=on#comments</comments>
<pubDate>2010-03-27T12:00:00+10:00</pubDate>
</item>
<item>
<title>eBay encourage/force you to lose money on postage</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=450</link>
<description>eBay's postage calculator is a very useful tool for sellers but does not allow you to add any surcharge to cover handling or the fee that PayPal (an eBay company) will take out of the postage amount if a buyer chooses PayPal.&lt;br&gt;&lt;br&gt;Not only that but eBay enforce sometimes unreasonable postage and handling charge limits on certain categories, for example a single book has a postage and handling charge limit less than the cost of postage to many areas of Australia. On top of tht they take their fee when payment is by PayPal so your loss is increased.&lt;br&gt;&lt;br&gt;So you may need to up your item price to cover the money lost on postage charges, but of course then eBay take a larger commission from the sale.</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=450&amp;comments=on#comments</comments>
<pubDate>2009-12-10T12:00:00+10:00</pubDate>
</item>
<item>
<title>CAPCTHAs and alternatives</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=449</link>
<description>CAPTCHAs and their alternatives&lt;br&gt;&lt;br&gt;The basic purpose of a CAPTCHA (Completely Automatic Public Turing Test to Tell Computers and Humans Apart) is to prevent robots from submitting web forms. By displaying an image that cannot be &#8220;read&#8221; by a computer, only a human can submit the form successfully.&lt;br&gt;&lt;br&gt;Most of the time CAPTCHAs are an irritation to legitimate users, and can also cause issues with accessibility unless an alternative audible version of the text or numbers in the CAPTCHA image is also available.&lt;br&gt;&lt;br&gt;My technique for CAPTCHA in Classic ASP is an image only system which works like this:&lt;br&gt;&lt;br&gt;When the form is displayed two random numbers are generated. One is used as the number that is generated into an image. The other random number is used as the name of a session variable which contains the first number. This second number is stored as a hidden form field (it doesn't matter that this second number can be easily read). I use a random session variable name so as not to cause problems if the user has multiple forms open, this way each should submit without any conflict. On form submit the script gets the hidden field value and then the value of this session variable and compares this with the user's input. If they don't match the user (or robot) is redirected back to the form and two new random numbers are generated so the process repeats.&lt;br&gt;&lt;br&gt;A more simple but less effective system that prevents some robots but avoids irritation to legitimate users and accessibility problems is to use a system similar to the CAPTCHA system described above where a random number is generated and added as a hidden form field and also stored in a session variable. On form post the hidden form field value is compared with the session variable value and succeeds only if they match. This means that the form can only be submitted if the user or robot visited the web form page first and posts the random number. This prevents robots that just simulate a form post to a URL from succeeding but doesn't stop the robot if they are willing to retrieve the web form page each time they post a form.&lt;br&gt;&lt;br&gt;An improvement to this system would be to use a JavaScript script to add the value to the hidden field. Again, this would be fairly easy for a robot to simulate but would mean that the robot would have to be written specifically for the site.&lt;br&gt;&lt;br&gt;Creating an image or audible CAPTCHA is not possible for some websites, for example in Classic ASP it usually requires a third party server component (although it can be done without one). There are other alternatives.&lt;br&gt;&lt;br&gt;* Instead of creating a random number you could generate a random mathematical question, for example:&lt;br&gt;&lt;br&gt;What is five plus twenty-three?&lt;br&gt;&lt;br&gt;* You could create a database of random questions and answers, for example:&lt;br&gt;&lt;br&gt;Which is not a colour? Blue, green, apple, orange or black?&lt;br&gt;&lt;br&gt;* You could show several photos of different objects and ask the visitor to pick which picture contains a certain object.&lt;br&gt;&lt;br&gt;All of these techniques are easy to produce using a system similar to what I described near the beginning of this article.&lt;br&gt;&lt;br&gt;* You could create a textbox and set it to display:none in CSS. A robot is likely to fill this field so you can void any form submissions where this textbox is not empty.&lt;br&gt;&lt;br&gt;* Dynamically change the names of form fields and store their new names in a session variable.</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=449&amp;comments=on#comments</comments>
<pubDate>2009-12-09T12:00:00+10:00</pubDate>
</item>
<item>
<title>Obtaining Image Properties in ASP Without a Component</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=448</link>
<description>You don't need a third party server component to determine the height and width of an image file in Classic ASP. The LoadPicture command will load an image into and object and you can then access the height and width, such as in this example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;Dim objImage&lt;br&gt;Set objImage = LoadPicture(Server.MapPath(&quot;image.ext&quot;)) &lt;br&gt;intWidth = objImage.Width&lt;br&gt;intHeight = objImage.Height&lt;/pre&gt;&lt;br&gt;4GuysFromRoll.com has an interesting article on resizing images without a component - see &lt;a href=http://www.4guysfromrolla.com/webtech/050300-1.shtml&gt;http://www.4guysfromrolla.com/webtech/050300-1.shtml&lt;/a&gt;.&lt;br&gt;&lt;br&gt;The following link contains some other code that can access image properties as well as modify GIF images: &lt;a href=http://www.u229.no/stuff/&gt;http://www.u229.no/stuff/&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Lastly the following link is for a component-less CAPTCHA genertor which generates a BMP image from ASP.It may help you understand how to create and modify BMP files. See &lt;a href=http://www.tipstricks.org/&gt;http://www.tipstricks.org/&lt;/a&gt;.</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=448&amp;comments=on#comments</comments>
<pubDate>2009-12-09T12:00:00+10:00</pubDate>
</item>
<item>
<title>New Microsoft Hotmail good reason not to use Microsoft Explorer</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=439</link>
<description>Am I the only one having problems with the newly updated Hotmail?&lt;br&gt;&lt;br&gt;I use Hotmail regularly throughout the day on a variety of computers, Windows XP and Vista, Microsoft Internet Explorer 7 and 8 (Beta). After going through a few pages Explorer freezes up and has to be forcibly ended.&lt;br&gt;&lt;br&gt;So now I prefer to use Firefox to check my Microsoft Hotmail.&lt;br&gt;&lt;br&gt;Incidently I find that you cannot reply to an email using Hotmail on Google Chrome.</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=439&amp;comments=on#comments</comments>
<pubDate>2008-12-10T12:00:00+10:00</pubDate>
</item>
<item>
<title>Why are most real estate agents so bad at selling online</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=438</link>
<description>I have often read or heard that the Internet is now the most successful method of advertising for real estate agents.&lt;br&gt;&lt;br&gt;So why is it that so many real estate agents fail to appreciate some basic fundamentals about advertising online.&lt;br&gt;&lt;br&gt;Having been looking for a house for the last few months I have encountered three main issues that irritate me when it comes to real estate agents.&lt;br&gt;&lt;br&gt;1. Poor listings&lt;br&gt;&lt;br&gt;Now I admit that I don&#8217;t know how websites like realestate.com.au or domain.com.au charge agents but my guess is that there is probably no difference in cost between 1 photo and 5 or 10 photos, and there is probably a very generous limit on the amount of text they can enter for the property description.&lt;br&gt;&lt;br&gt;So I don&#8217;t understand why so many agents have one photo and/or a very brief description of the property, often omitting information that might be important to potential buyers.&lt;br&gt;&lt;br&gt;Agents should understand that certain information will affect whether their listing will appear when certain search criteria is selected. For example, I want to search for a house with a double garage but so many agents leave the carspaces that I can&#8217;t depend on this feature.&lt;br&gt;&lt;br&gt;And why do so many use bad quality photos?&lt;br&gt;&lt;br&gt;2. Response to enquiries&lt;br&gt;&lt;br&gt;In this day and age it is not unreasonable to expect a reply to an email enquiry within several hours. At worst you would expect a business to check and respond to emails at least once a day.&lt;br&gt;&lt;br&gt;But a large percentage of agents in my experience either do not respond to emails at all or take several days.&lt;br&gt;&lt;br&gt;And when I ask a question I expect an answer in reply. So to the agent who replied to my request for the property&#8217;s address some two weeks later with, &#8220;Please telephone our office to speak to one of our sales consultants,&#8221; I say much too little, much too late.&lt;br&gt;&lt;br&gt;3. Failure to update listings&lt;br&gt;&lt;br&gt;Too many times I have enquired about properties only to find out that they have been long sold or are under contract.&lt;br&gt;&lt;br&gt;I know the popular websites have the facility for agents to indicate that a property is sold or under offer or contract. I wish more agents would use them.&lt;br&gt;&lt;br&gt;And it is good to see agents listing open for inspection times online (and I wish more would) but there should be no excuse for not removing these when the open house is cancelled.&lt;br&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=438&amp;comments=on#comments</comments>
<pubDate>2008-12-08T12:00:00+10:00</pubDate>
</item>
<item>
<title>Classic ASP Title Case</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=416</link>
<description>Need a function that capitalises the first letter of each word, as used in titles?
&lt;p&gt;
Unlike some title case functions, this one doesn't just look for spaces, but capitilises the first letter after each non-alpha character which means that hyphenated words and words after numbers are considered new words.
&lt;p&gt;
&lt;textarea cols=40 rows=10 style=&quot;width:95%&quot;&gt;Function TitleCase(byVal strValue)
       Dim intChat, intLastChar, blnUCase
       strValue = LCase(strValue)
       For intChar = 1 To Len(strValue)
              blnUCase = False
              If intChar = 1 Then
                     blnUCase = True
              Else
                     intLastChar = Asc(Mid(strValue, intChar - 1, 1))
                     If Not ((intLastChar &gt;= 97 And intLastChar &lt;= 122) Or (intLastChar &gt;= 65 And intLastChar &lt;= 90)) Then
                           blnUCase = True
                     End If
              End If
              If blnUCase Then
                     strValue = Left(strValue, intChar - 1) &amp; UCase(Mid(strValue, intChar, 1)) &amp; Mid(strValue, intChar + 1)
              End If 
       Next
       TitleCase = strValue
End Function&lt;/textarea&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=416&amp;comments=on#comments</comments>
<pubDate>2008-07-29T12:00:00+10:00</pubDate>
</item>
<item>
<title>Does stopfax.com.au really stop junk faxes?</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=414</link>
<description>I received a &quot;spam&quot; fax some time ago on my home fax machine. I was pleased to see an opt-out website link at the bottom of the page which was www.stopfax.com.au/companyname. I didn't want any more faxes sent to my home fax so I went to the address and through the process to remove myself from this list.&lt;br&gt;&lt;br&gt;However, over the following months I continued to receive &quot;spam&quot; faxes all from different companies but with a similar stopfax.com.au link to be removed from list.&lt;br&gt;&lt;br&gt;I did follow the removal process with each fax but the faxes have not stopped.&lt;br&gt;&lt;br&gt;I did a whois lookup of the stopfax.com.au domain name and found the owner to be:&lt;br&gt;&lt;br&gt;&lt;i&gt;CBOX PTY LTD&lt;br&gt;www.cbox.com.au&lt;/i&gt;&lt;br&gt;&lt;br&gt;I have sent the following message through their contact us form on their website and will see what the response is.&lt;br&gt;&lt;br&gt;&lt;i&gt;Please remove my fax number from your database - 02xxxxxxxx. This is a home fax machine and I do not wish to receive any more faxes from any of your customers ever again. Thank you.&lt;/i&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=414&amp;comments=on#comments</comments>
<pubDate>2008-07-26T12:00:00+10:00</pubDate>
</item>
<item>
<title>SQL Injection Protection - b.js</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=407</link>
<description>There is a automated SQL injection attack doing the rounds at the moments which injects some html (&amp;lt;script src=http://www.domain.com/b.js&amp;gt;&amp;lt;/script&amp;gt;) into certain fields in all the tables in a database.
&lt;p&gt;
If you have been attacked don't feel bad as an Internet search of &quot;b.js&quot; reveals tens of thousands of hacked sites.
&lt;p&gt;
The attack cleverly appends a series of SQL commands onto  your querystrings and if your code is unprotected, and you don't use Access databases, the commands may be passed on to your SQL server and the damage done.
&lt;p&gt;
Considering the damage that could be done by this sort of attack, I guess we are lucky that they chose only to append their little JavaScript.
&lt;p&gt;
However, this attack could render your website as &quot;unsafe&quot; in search engine results.
&lt;p&gt;
&lt;strong&gt;Reversing the Damage&lt;/strong&gt;
&lt;p&gt;
We are also extremely fortunate that the changes can be easily reversed with a few changes of the attackers original SQL commands.
&lt;p&gt;
Simply execute the following to clean up the damage. If you have been attacked multiple times (ie. you have multiple script blocks appended to your SQL data) then you will need to execute the following script for each attack.
&lt;p&gt;
&lt;textarea cols=5 rows=10 style=&quot;width:95%&quot;&gt;DECLARE @T varchar(255), @C varchar(255);
DECLARE Table_Cursor CURSOR FOR
SELECT a.name, b.name
FROM sysobjects a, syscolumns b
WHERE a.id = b.id AND a.xtype = 'u' AND
(b.xtype = 99 OR
b.xtype = 35 OR
b.xtype = 231 OR
b.xtype = 167);
OPEN Table_Cursor;
FETCH NEXT FROM Table_Cursor INTO @T, @C;
WHILE (@@FETCH_STATUS = 0) BEGIN
  EXEC(
    'update ['+@T+'] set ['+@C+'] = left(
            convert(varchar(8000), ['+@C+']),
            len(convert(varchar(8000), ['+@C+'])) - 6 -
            patindex(''%tpircs&lt;%'',
                      reverse(convert(varchar(8000), ['+@C+'])))
            )
      where ['+@C+'] like ''%&lt;script%&lt;/script&gt;'''
      );
  FETCH NEXT FROM Table_Cursor INTO @T, @C;
END;
CLOSE Table_Cursor;
DEALLOCATE Table_Cursor;&lt;/textarea&gt;
&lt;p&gt;
&lt;strong&gt;Protecting against attacks&lt;/strong&gt;
&lt;p&gt;
There are many methods out there to protect against this sort of attack.
&lt;p&gt;
The best method is to ensure that you protect every value that you pass to SQL. Strings should have a function to replace single quotes with two single quotes. Numbers should have a function that forces them to a numeric value. 
&lt;p&gt;
The following function is a simple method which removes multiple inline SQL commands. If you issue multiple inline SQL commands in one go then obviously it will not be suitable but for everyone else it should stop any attack. This will not protect against all types of attacks however.
&lt;p&gt;
Parse your SQL command strings with the following syntax:
&lt;p&gt;
&lt;i&gt;SQLCheck(sql-string-here)&lt;/i&gt;
&lt;p&gt;
&lt;textarea cols=5 rows=10 style=&quot;width:95%&quot;&gt;Function SQLCheck(strCommand)
	Dim intChar
	Dim blnQuotes
	SQLCheck = strCommand
	blnQuotes = False
	For intChar = 1 To Len(strCommand)
		If Mid(strCommand, intChar, 1) = &quot;'&quot; Then
			If Not blnQuotes Then
				blnQuotes = True
			Else
				If intChar &lt; Len(strCommand) Then
					If Mid(strCommand, intChar + 1, 1) = &quot;'&quot; Then
						intChar = intChar + 1
					Else
						blnQuotes = False
					End If
				End If

			End If
		ElseIf Mid(strCommand, intChar, 1) = &quot;;&quot; Then
			If Not blnQuotes Then
				SQLCheck = Left(strCommand, intChar - 1)
				Exit For
			End If
		End If
	Next
End Function&lt;/textarea&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=407&amp;comments=on#comments</comments>
<pubDate>2008-06-30T12:00:00+10:00</pubDate>
</item>
<item>
<title>Unfair eBay fees for used cars</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=402</link>
<description>Having just been through the process of selling a cheap used car on eBay I have seen first hand the unfairness of eBay's fees for this category.&lt;br&gt;&lt;br&gt;By a cheap car I mean $250.&lt;br&gt;&lt;br&gt;eBay's fees are $5 for the listing and a fixed commission of $40 upon successful sale.&lt;br&gt;&lt;br&gt;For a $250 car that means the fees total nearly 20%.&lt;br&gt;&lt;br&gt;Selling a $50,000 car? Your fees would be just a fraction of 1%.&lt;br&gt;&lt;br&gt;I realise that eBay have to be price competitive with other online car advertising sites but surely for cheap cars they could have a lower commission based on the sale price.&lt;br&gt;&lt;br&gt;Now I see why I often see cheap used cars advertised outside of the used car category.</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=402&amp;comments=on#comments</comments>
<pubDate>2008-06-10T12:00:00+10:00</pubDate>
</item>
<item>
<title>100% CSS Layout</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=397</link>
<description>I had been looking for a CSS layout that has three components - a header, footer and content area - and the following characteristics:
&lt;ul&gt;
&lt;li&gt;When the content in the content area does not fill the available window space the footer should be set to the bottom of the page.&lt;/li&gt;
&lt;li&gt;When the content overflows the footer should be positioned at the end of the document, off the screen.&lt;/li&gt;
&lt;li&gt;The content area should fill at least all remaining window space so that any object I put inside it can scale to 100% of its height.&lt;/li&gt;
&lt;li&gt;The content area should have a minimum height so that it won't look silly in a very tiny window (unlikely)&lt;/li&gt;
&lt;li&gt;If the user resizes the browser the content area should resize.&lt;/li&gt;
&lt;/ul&gt;
I couldn't find a pure CSS solution so I came up with a solution that uses CSS and JavaScript.
&lt;p&gt;
&lt;a href=&quot;/blog/uploads/att397_layout.htm&quot; target=&quot;_blank&quot;&gt;View Sample (new window)&lt;/a&gt;
&lt;p&gt;
&lt;textarea rows=20 cols=50 style=&quot;width:95%&quot;&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
		function maxContent(){
			var divContent = getElementDimensions(document.getElementById(&quot;content&quot;));
			var divHeader = getElementDimensions(document.getElementById(&quot;header&quot;));
			var divFooter = getElementDimensions(document.getElementById(&quot;footer&quot;));
			var remainder = document.documentElement.clientHeight - divContent.y - divFooter.height - 0
			if(remainder&lt;250){remainder=250}; //minimum height of content
			document.getElementById(&quot;content&quot;).style.height = remainder + &quot;px&quot;;
			function getElementDimensions(q){
				var offsetY=offsetX=0;
				var height=q.scrollHeight;
				var width=q.scrollWidth;
				while(q){
					offsetX+=q.offsetLeft;
					offsetY+=q.offsetTop;
					q=q.offsetParent;
				}
				return{
					&quot;x&quot;:offsetX,&quot;y&quot;:offsetY,&quot;height&quot;:height,&quot;width&quot;:width
				};
			}
		}
		window.onload = maxContent;
		window.onresize = maxContent;
    &lt;/script&gt;
    &lt;style type=&quot;text/css&quot;&gt;
		html,body {
			margin:0;
			padding:0;
		}
		div#container {
		}
		div#header {
			background-color:#fbb;
		}
		div#content {
			background-color:#bfb;
		}
		div#footer {
			background-color:#bbf;
			width:100%;
			bottom:0;
		}
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;container&quot;&gt;
		&lt;div id=&quot;header&quot;&gt;
			Header
		&lt;/div&gt;
		&lt;div id=&quot;content&quot;&gt;
			&lt;table border=&quot;1&quot; height=&quot;100%&quot;&gt;
				&lt;tr&gt;
					&lt;td&gt;1&lt;/td&gt;
					&lt;td&gt;2&lt;/td&gt;
					&lt;td&gt;3&lt;/td&gt;
				&lt;/tr&gt;
				&lt;tr&gt;
					&lt;td&gt;b1&lt;/td&gt;
					&lt;td&gt;b2&lt;/td&gt;
					&lt;td&gt;b3&lt;/td&gt;
				&lt;/tr&gt;
			&lt;/table&gt;
		&lt;/div&gt;

		&lt;div id=&quot;footer&quot;&gt;
			Footer
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/textarea&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=397&amp;comments=on#comments</comments>
<pubDate>2008-05-28T12:00:00+10:00</pubDate>
</item>
<item>
<title>MySql: Data Types</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=389</link>
<description>
&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Type {storage}&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Range&lt;/th&gt;
&lt;th&gt;Attributes&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{1 byte}&lt;/td&gt;
&lt;td&gt;TINYINT[(M)]&lt;/td&gt;
&lt;td&gt;-128 TO 127&lt;br /&gt; [0 to 255 if UNSIGNED]&lt;/td&gt;
&lt;td&gt;AUTO_INCREMENT&lt;br /&gt; UNSIGNED, ZEROFILL,&lt;br /&gt;SERIAL&amp;nbsp;DEFAULT&amp;nbsp;VALUE&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{2 bytes}&lt;/td&gt;
&lt;td&gt;SMALLINT[(M)]&lt;/td&gt;
&lt;td&gt;-32,768 to 32,767&lt;br /&gt; [0 to 65,535]&lt;/td&gt;
&lt;td&gt;AUTO_INCREMENT,&lt;br /&gt; UNSIGNED, ZEROFILL,&lt;br /&gt;SERIAL&amp;nbsp;DEFAULT&amp;nbsp;VALUE&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{3 bytes}&lt;/td&gt;
&lt;td&gt;MEDIUMINT[(M)]&lt;/td&gt;
&lt;td&gt;-8,388,608 to 8,388,607&lt;br /&gt; [0 to 16,777,215]&lt;/td&gt;
&lt;td&gt;AUTO_INCREMENT,&lt;br /&gt; UNSIGNED, ZEROFILL,&lt;br /&gt;SERIAL&amp;nbsp;DEFAULT&amp;nbsp;VALUE&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{4 bytes}&lt;/td&gt;
&lt;td&gt;INT[(M)]&lt;/td&gt;
&lt;td&gt;-/+2.147E+9&lt;br /&gt; [0 to 4.294E+9]&lt;/td&gt;
&lt;td&gt;AUTO_INCREMENT,&lt;br /&gt; UNSIGNED, ZEROFILL,&lt;br /&gt;SERIAL&amp;nbsp;DEFAULT&amp;nbsp;VALUE&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{8 bytes}&lt;/td&gt;
&lt;td&gt;BIGINT[(M)]&lt;/td&gt;
&lt;td&gt;-/+9.223E+18&lt;br /&gt; [0 to 18.45E+18]&lt;/td&gt;
&lt;td&gt;AUTO_INCREMENT,&lt;br /&gt; UNSIGNED, ZEROFILL,&lt;br /&gt;SERIAL&amp;nbsp;DEFAULT&amp;nbsp;VALUE&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{4 or 8}&lt;/td&gt;
&lt;td&gt;FLOAT(p)&lt;/td&gt;
&lt;td&gt;p=0-24 &amp;nbsp;--&gt; &quot;FLOAT&quot;&lt;br /&gt;p=25-53 &amp;nbsp;--&gt; &quot;DOUBLE&quot;&lt;/td&gt;
&lt;td&gt;UNSIGNED, ZEROFILL&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{4 bytes}&lt;/td&gt;
&lt;td&gt;FLOAT[(M,D)]&lt;/td&gt;
&lt;td&gt;Min=+/-1.175E-38&lt;br /&gt; Max=+/-3.403E+38&lt;/td&gt;
&lt;td&gt;UNSIGNED, ZEROFILL&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{8 bytes}&lt;/td&gt;
&lt;td&gt;DOUBLE[(M,D)]&lt;/td&gt;
&lt;td&gt;Min=+/-2.225E-308&lt;br /&gt; Max=+/-1.798E+308&lt;/td&gt;
&lt;td&gt;UNSIGNED, ZEROFILL&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numeric&lt;br /&gt;{M+2}&lt;/td&gt;
&lt;td&gt;DECIMAL[(M,[D])]&lt;br /&gt;Stored as string&lt;/td&gt;
&lt;td&gt;Max Range = DOUBLE range&lt;br /&gt;Fixed point vs. DOUBLE float&lt;/td&gt;
&lt;td&gt;UNSIGNED, ZEROFILL&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bit&lt;br /&gt;{8 bytes}&lt;/td&gt;
&lt;td&gt;BIT[(M)]&lt;/td&gt;
&lt;td&gt;Binary. Display by [add zero |&lt;br /&gt;converting with BIN()]. M=1-64&lt;/td&gt;
&lt;td&gt;Prior to 5.03&lt;br /&gt;TINYINT(1) Synonym&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [0 if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{M char's}&lt;/td&gt;
&lt;td&gt;CHAR[(M)]&lt;/td&gt;
&lt;td&gt;M=0-255 Characters, FIXED.&lt;br /&gt;Right padded with spaces.&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{M char's&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;VARCHAR(M)&lt;/td&gt;
&lt;td&gt;M=0-65,535 Characters&lt;br /&gt;M=0-255 &amp;lt;v5.0.3&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#char's&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;TINYTEXT&lt;sup&gt;2&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;0-255 Characters&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#char's&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;TEXT&lt;sup&gt;2&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;0-65,535 Char's&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#char's&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;MEDIUMTEXT&lt;sup&gt;2&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;0-16,777,215 Char's&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#char's&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;LONGTEXT&lt;sup&gt;2&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;0-4,294,967,295 Char's&lt;/td&gt;
&lt;td&gt;BINARY, CHARACTER&amp;nbsp;SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{M bytes}&lt;/td&gt;
&lt;td&gt;BINARY[(M)]&lt;/td&gt;
&lt;td&gt;M=0-255 bytes, FIXED.&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{M bytes}&lt;/td&gt;
&lt;td&gt;VARBINARY(M)&lt;/td&gt;
&lt;td&gt;0-65,535 bytes&lt;br /&gt;M=0-255 &amp;lt;v5.0.3&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#bytes&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;TINYBLOB&lt;/td&gt;
&lt;td&gt;0-255 bytes&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#bytes&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;BLOB&lt;/td&gt;
&lt;td&gt;0-65,535 bytes&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#bytes&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;MEDIUMBLOB&lt;/td&gt;
&lt;td&gt;0-16,777,215 bytes&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{#bytes&lt;sup&gt;1&lt;/sup&gt;}&lt;/td&gt;
&lt;td&gt;LONGBLOB&lt;/td&gt;
&lt;td&gt;0-4,294,967,295 bytes&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(case sensitive)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{1-2 bytes}&lt;/td&gt;
&lt;td&gt;ENUM&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;(&quot;A1&quot;,&quot;A2&quot;,...)&lt;/td&gt;
&lt;td&gt;Column is exactly 1 of 1-65,535 values&lt;/td&gt;
&lt;td&gt;CHARACTER SET&lt;/td&gt;
&lt;td&gt;NULL [1st value if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String&lt;br /&gt;{1-8 bytes}&lt;/td&gt;
&lt;td&gt;SET&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;(&quot;A1&quot;,&quot;A2&quot;,...)&lt;/td&gt;
&lt;td&gt;Column is 0 or more values in list of 1-64 members&lt;/td&gt;
&lt;td&gt;CHARACTER SET&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt; [&quot;&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date &amp;amp; Time&lt;br /&gt;{3 bytes}&lt;/td&gt;
&lt;td&gt;DATE&lt;/td&gt;
&lt;td&gt;&quot;1000-01-01&quot; - &quot;9999-12-31&quot;&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(YYYY-MM-DD)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt;[&quot;0000-00-00&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date &amp;amp; Time&lt;br /&gt;{8 bytes}&lt;/td&gt;
&lt;td&gt;DATETIME&lt;/td&gt;
&lt;td&gt;&quot;1000-01-01 00:00:00&quot; -&lt;br /&gt;&quot;9999-12-31 23:59:59&quot;&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(YYYY-MM-DD hh:mm:ss)&lt;/td&gt;
&lt;td&gt;NULL [&quot;0000-00-00 00:00:00&quot;&lt;br /&gt; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date &amp;amp; Time&lt;br /&gt;{3 bytes}&lt;/td&gt;
&lt;td&gt;TIME&lt;/td&gt;
&lt;td&gt;&quot;-838:59:59&quot; - &quot;838:59:59&quot;&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(hh:mm:ss)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt;[&quot;00:00:00&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date &amp;amp; Time&lt;br /&gt;{4 bytes}&lt;/td&gt;
&lt;td&gt;TIMESTAMP&lt;/td&gt;
&lt;td&gt;19700101000000 -&lt;br /&gt;2037+&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(YYYYMMDDhhmmss)&lt;/td&gt;
&lt;td&gt;Current Date &amp;amp; Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date &amp;amp; Time&lt;br /&gt;{1 bytes}&lt;/td&gt;
&lt;td&gt;YEAR&lt;/td&gt;
&lt;td&gt;1900 - 2155&lt;/td&gt;
&lt;td&gt;Global Only&lt;br /&gt;(YYYY)&lt;/td&gt;
&lt;td&gt;NULL&lt;br /&gt;[&quot;0000&quot; if NOT NULL]&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=389&amp;comments=on#comments</comments>
<pubDate>2008-05-03T12:00:00+10:00</pubDate>
</item>
<item>
<title>MS-SQL: Data Types</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=388</link>
<description>&lt;table&gt;
&lt;th&gt;
Data Types
&lt;/th&gt;
&lt;th&gt;
Description
&lt;/th&gt;

&lt;tr&gt;
&lt;td&gt;
bigint
&lt;/td&gt;
&lt;td&gt;
Integer data from -2^63 through 2^63-1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
int
&lt;/td&gt;
&lt;td&gt;
Integer data from -2^31 through 2^31 - 1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
smallint
&lt;/td&gt;
&lt;td&gt;
Integer data from -2^15 through 2^15 - 1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
tinyint
&lt;/td&gt;
&lt;td&gt;
Integer data from 0 through 255
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
bit
&lt;/td&gt;
&lt;td&gt;
Integer data with either a 1 or 0 value
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
decimal
&lt;/td&gt;
&lt;td&gt;
Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
numeric
&lt;/td&gt;
&lt;td&gt;
Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
money
&lt;/td&gt;
&lt;td&gt;
Monetary data values from -2^63 through 2^63 - 1
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
smallmoney
&lt;/td&gt;
&lt;td&gt;
Monetary data values from -214,748.3648 through +214,748.3647
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
float
&lt;/td&gt;
&lt;td&gt;
Floating precision number data from -1.79E + 308 through 1.79E + 308
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
real
&lt;/td&gt;
&lt;td&gt;
Floating precision number data from -3.40E + 38 through 3.40E + 38
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
datetime
&lt;/td&gt;
&lt;td&gt;
Date and time data from January 1, 1753, through December 31, 9999,&lt;br&gt;
with an accuracy of 3.33 milliseconds
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
smalldatetime
&lt;/td&gt;
&lt;td&gt;
Date and time data from January 1, 1900, through June 6, 2079,&lt;br&gt;
with an accuracy of one minute
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
char
&lt;/td&gt;
&lt;td&gt;
Fixed-length  character data with a maximum length of 8,000 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
varchar
&lt;/td&gt;
&lt;td&gt;
Variable-length  data with a maximum of 8,000 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
text
&lt;/td&gt;
&lt;td&gt;
Variable-length  data with a maximum length of 2^31 - 1 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
nchar
&lt;/td&gt;
&lt;td&gt;
Fixed-length Unicode data with a maximum length of 4,000 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
nvarchar
&lt;/td&gt;
&lt;td&gt;
Variable-length Unicode data with a maximum length of 4,000 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
ntext
&lt;/td&gt;
&lt;td&gt;
Variable-length Unicode data with a maximum length of 2^30 - 1 characters
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
binary
&lt;/td&gt;
&lt;td&gt;
Fixed-length binary data with a maximum length of 8,000 bytes
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
varbinary
&lt;/td&gt;
&lt;td&gt;
Variable-length binary data with a maximum length of 8,000 bytes
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
image
&lt;/td&gt;
&lt;td&gt;
Variable-length binary data with a maximum length of 2^31 - 1 bytes
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
cursor
&lt;/td&gt;
&lt;td&gt;
A reference to a cursor
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
sql_variant
&lt;/td&gt;
&lt;td&gt;
A data type that stores values of various data types,&lt;br&gt;
except text, ntext, timestamp, and sql_variant
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
table
&lt;/td&gt;
&lt;td&gt;
A special data type used to store a result set for later processing
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
timestamp
&lt;/td&gt;
&lt;td&gt;
A database-wide unique number that gets updated every time&lt;br&gt;
a row gets updated
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;
uniqueidentifier
&lt;/td&gt;
&lt;td&gt;
A globally unique identifier
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=388&amp;comments=on#comments</comments>
<pubDate>2008-05-03T12:00:00+10:00</pubDate>
</item>
<item>
<title>VBScript: Suggested Prefixes for Indicating the Data Type of a Variable</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=387</link>
<description>&lt;table&gt; &lt;tr&gt; &lt;th&gt; &lt;p&gt;Data Type&lt;/p&gt; &lt;/th&gt; &lt;th&gt; &lt;p&gt;Prefix&lt;/p&gt; &lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;ADO command&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;cmd&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;ADO connection&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;cnn&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;ADO field&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;fld&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;ADO parameter&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;prm&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;ADO recordset&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;rst&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Boolean&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;bln&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Byte&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;byt&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Collection object&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;col&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Currency&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;cur&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Date-time&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;dtm&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Double&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;dbl&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Error&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;err&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Integer&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;int&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Long&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;lng&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Object&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;obj&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Single&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;sng&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;String&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;str&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;User-defined type&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;udt&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p&gt;Variant&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;td&gt; &lt;p&gt;vnt&lt;br /&gt; &lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=387&amp;comments=on#comments</comments>
<pubDate>2008-05-03T12:00:00+10:00</pubDate>
</item>
<item>
<title>Handling Boolean Fields in MS-SQL and MS-Access</title>
<link>http://www.blog.johnavis.com/blog/default.asp?id=385</link>
<description>If you have migrated from Microsoft Access to SQL Server or MySql then you have probably encountered the differences with boolean values.
&lt;p&gt;
In Microsoft Access you can use true or false in queries, for example:
&lt;p&gt;
&lt;pre&gt;SELECT * FROM tablename WHERE booleanfield=TRUE
SELECT * FROM tablename WHERE booleanfield=FALSE&lt;/pre&gt;
SQL Server/MySql require a different approach:
&lt;p&gt;
&lt;pre&gt;SELECT * FROM tablename WHERE booleanfield=1
SELECT * FROM tablename WHERE booleanfield=0&lt;/pre&gt;
The Microsoft Access query will not work in SQL Server/MySql and the SQL Server/MySql query will not work in Access as it treats true as -1 not 1.
&lt;p&gt;
For a cross-platform solution you can use the following:
&lt;p&gt;
&lt;pre&gt;SELECT * FROM tablename WHERE booleanfield&lt;&gt;0
SELECT * FROM tablename WHERE booleanfield=0&lt;/pre&gt;</description>
<comments>http://www.blog.johnavis.com/blog/default.asp?id=385&amp;comments=on#comments</comments>
<pubDate>2008-05-03T12:00:00+10:00</pubDate>
</item>
</channel>
</rss>
