devxlogo

Tip Bank

Folder Sharing in Windows

Have you ever needed to share many folders simultaneously? Windows provides an executable to do just that. It’s called the “Share Creation Wizard.” Call this wizard by typing SHRPUBW in

Batch Processing in Hibernate

Suppose you need to insert 200,000 records into a database in Hibernate. You’ll need to adjust the following settings: //set the JDBC batch size (it is fine somewhere between 20-50)hibernate.jdbc.batch_size

Determine Whether a Table Has an Identity Column

This code is for MSSQL Server, but applicable for MS SSQL Server 7 or above. Check in T-SQL: SELECT OBJECTPROPERTY(object_id(‘TableToBeChecked’), ‘TableHasIdentity’) SQL Server returns 1 if the table has an

Platform-independent New Line Characters

Because you need to use the new line character in most outputs?and because the line-terminating characters differ on different systems?you need to be able to identify what kind of system

Changing Column Names in Oracle

Oracle does not have a mechanism by which you directly change column names. But this workaround is quick and efficient. Consider TableA: COLUMN_1 NUMBERCOLUMN_2 VARCHAR2(500)COLUMN_3 DATE You want to change

Using XMLSchema DOM and SAX in JAXP 1.2

To take advantage of the power of XMLSchema in a SAX or DOM application, you simply have to set two properties. In JAXP 1.3, use the javax.xml.validation package. The two

Add a Fresh Set of Records to a Dataset

When you execute a new query and populate an existing dataset, the newly retrieved records are appended to the existing records in the dataset. If you wish to remove the