May 14, 2008

Introduction to the WPF Command Framework

indows Presentation Foundation (WPF) not only lets you do new things, it lets you do familiar things in new ways. As we’re all developers, rather than going through the background information, this article just dives right in with an example and works from there. Here’s a simple user interface?a typical

Using the GRANT Command

The SQL GRANT command is used to grant access privileges to database objects and role authorizations. For example, the following statement grants the user username the right to SELECT tabname: GRANT SELECT ON tabname TO username Some database vendors, such as Oracle and MySQL, have extended GRANT‘s abilities to create

Quickly Copy Data Rows from DataReader to a DataTable

In many situations, it’s wiser to use DataReader instead of a DataSet. However, DataReader is limited due to its inability to transform data rows into a suitable holder, like DataTable. The usual workaround for this limitation is to loop through the DataRows from the DataReader and assign them to the

Use an XMLReporter for Report Customizable Errors in StAX Applications

To customize error reports in StAX applications (except fatal errors), you can configure an XMLReporter like this: XMLInputFactory XMLif=null; //get an XMLInputFactory objectXMLif=XMLInputFactory.newInstance();//setting an XMLReporterXMLif.setXMLReporter(new XMLReporter() { public void report(String message, String error_type, Object info, Location location) { System.err.println(“L: “+location.getLineNumber()+”, C: “+location.getColumnNumber()); System.err.println(message); }});…