January 28, 2009

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

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=ServerSocketChannel.open(); serverNIO.configureBlocking(false); }catch(IOException e) {System.out.println(” Error: ” + e.getMessage());}//indicate the

DevX - Software Development Resource

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),