Latest Snippets

Postback - showModalDialog

You'll notice if you do a postback/submit within a dialog window in IE, it posts...

General snippet posted by Christoff Truter on 2009-09-23 07:19:57
View Snippet

 

Set Maximum Request Size

In your web.config, find the system.web node and add the httpRuntime child node,...

ASP.net snippet posted by Christoff Truter on 2009-07-29 11:55:22
View Snippet

 

Force site to run in IE7 Compatibility mode

Recently we developed an intranet application simply using all the microsoft com...

General snippet posted by Christoff Truter on 2009-07-22 10:00:19
View Snippet

 

FileSystemWatcher example

An example of how to monitor the filesystem using the filesytemwatcher class in ...

C# snippet posted by Christoff Truter on 2009-06-27 22:08:12
View Snippet

 

Format Currency

Format a string into a currency format, similar to the FormatCurrency function i...

Javascript snippet posted by www.sonofsofaman.com on 2009-06-12 09:52:50
View Snippet

 

MD5 hash

The following snippet demonstrates how to create a MD5 hash using SQL 2005...

MSSQL snippet posted by Christoff Truter on 2009-06-11 10:01:37
View Snippet

 

Register Globals off

If you don't have access to your php.ini or the ability to set register_globals ...

PHP snippet posted by Christoff Truter on 2009-06-09 11:47:26
View Snippet

 

Table Variables

SQL 2000 introduced an alternative to temporary tables called table variables....

MSSQL snippet posted by Christoff Truter on 2009-06-08 15:59:55
View Snippet

 

MD5 hash

Calculate the MD5 hash of a given string...

C# snippet posted by Christoff Truter on 2009-06-02 14:08:47
View Snippet

 

Row Number

How to number rows of a query using mysql...

MySQL snippet posted by Christoff Truter on 2009-05-22 14:36:53
View Snippet

 

Snippets

Table Variables

SQL 2000 introduced an alternative to temporary tables called table variables.

DECLARE @test TABLE (id INT, title VARCHAR(50))
 
INSERT INTO @test(id, title)
VALUES(1, 'some value')
 
SELECT id,title FROM @test


posted by Christoff Truter on 2009-06-08 15:59:55

 

Comments


Write a comment

* *
*

* Required fields

Latest MSSQL Snippets

MD5 hash

The following snippet demonstrates how to create a MD5 hash using SQL 2005...

posted by Christoff Truter on 2009-06-11 10:01:37
View Snippet

 

Table Variables

SQL 2000 introduced an alternative to temporary tables called table variables....

posted by Christoff Truter on 2009-06-08 15:59:55
View Snippet

 

Recursive query

Here we've got a simple example of how to select hierarchical (tree like structu...

posted by Christoff Truter on 2009-02-22 15:41:29
View Snippet

 

Paging rows

This is a simple script I use from time to time to page rows in SQL 2005 using C...

posted by Christoff Truter on 2009-02-22 11:49:55
View Snippet