January 28, 2009

Add an AutoIncrement Column to a DataTable

Adding an AutoIncrement column to a DataTable is quite simple: When you create a DataColumn, set its AutoIncrement property to true. The following code demonstrates: DataColumn posId = table.Columns.Add(“PositionId”, typeof(int));posId.AutoIncrement

Adding Custom Attributes to HTML Elements

A custom attribute is any user-defined attribute, just like other primitive HTML element attributes. You can add custom attributes to any HTML element. For example, suppose you wanted to add

Associate a ServerSocket with a ServerSocketChannel in an NIO App

This tip shows you how to create a ServerSocketChannel, to which you’ll then associate a standard ServerSocket: //create the ServerSocketChanneltry{; serverNIO.configureBlocking(false); }catch(IOException e) {System.out.println(” Error: ” + e.getMessage());}//indicate the

Reliable Sessions Made Simple with WCF

he ACME Toothpick Company recently implemented two transactional Windows Communication Foundation (WCF) services to integrate their toothpick manufacturing and log inventory applications. A third application, the ACME Manufacturing Manager (AMM),