devxlogo

Tip Bank

Move a Title-less Form

If you’ve struggled with setting static variables in MouseDown, and MouseUp commands to enable users to drag borderless windows around the screen, here’s a simpler way: If Button = False

Retrieve All Columns from Each Table in Every Database

This stored procedure retrieves all the columns of each table in every database. create procedure SP_GetAllColumnsFromAllDB/*———————————————————————- Procedure to retrieve columns of all the databases– Usage : exec SP_GetAllColumnsFromAllDB– Logic is:

Build a Reusable AJAX Class

Building a reusable AJAX class can help you eliminate some of the headaches when you’re starting out: Open a new file called connection.js and type the following lines in to

Convert Numbers to Excel Column Names

This algorithm converts column numbers (1-x) to Excel column names. It works for any number and does not have a limit. ‘————————————————–‘ Columns can be any number from 1 to

Retrieve Records from a Supplied SQL Statement

To retrieve the required field from the table based on the supplied condition, use the following code: Function GetQueryResults(strSql As String, Optional ReadOnly As Boolean = True) _As Recordset Dim

Run Tomcat with a Security Manager

To run Tomcat with a security manager, you must add your own policy lines to the catalina.policy file?like when you build a SecurityManager. The catalina.policy file can be found here:

Finding a SQL Server Object

To find a SQL Server object, such as a user table, query the sysobjects system table in the local database. If the database name is unknown, use the following query:

Avoid Conflict when Using Dates

Suppose you have imported both java.util and java.sql packages into your program and you wish to use a Date class. This would create a conflict because both the packages have

Clear All the Controls in a Form

Use this code to clear all the controls in a form. ‘ Inputs : Frm – Form to clear’ All – If False, then only those controls whose TAGFIXED will