September 9, 1999

Create Preview Windows in HTML Pages

Here is a simple way to provide preview window functionality in your Web pages. The idea is to have some kind of text area on the HTML pagewhere user can key in the data that needs to be previewed before printing or submitting the request to the Web server. Function

Check if Provider Supports Output Parameters from Stored Procedures

You can always write a stored procedure which can return some value in the form of parameters. This feature to return information from stored procedures in the form of parameters is very useful. But there are few things that you should consider before you try to use this feature. For

Type the Keyword Exactly to Avoid Syntax Errors in JScript

VBScript is not case sensitive. JScript on the other hand, is case sensitive. So when Web scripts reference JScript keywords, care must be taken to type the keyword exactly as spelled in the reference documentation. The same applies to JScript variables and object, method, and property names. They should be

Boost Performance of the IIS App by Turning off Session State

If a Web application does not make use of IIS sessions, Internet Information Services snap-in should be used to disable session state for the entire application, if possible. Sessions in IIS remain in memory, and the memory allocated to the sessions are not freed until the session has been terminated

Start SQLServer Dynamically with
VB and SQL-DMO Objects

Create a new standard exe project and add reference of sqldmo.rll. This file can be found in BinnResources1033sqldmo.rll under SqlServer70 directory.Now add following code and declaration in your form’s code: Private WithEvents oSqlServer As SQLDMO.SQLServerPrivate Function StartSqlServer(ByVal strServerName As String, strErrorMsg As String) As BooleanStatic boolFunctionExecuting As Boolean If Not

What Reflection Means in Java

Through reflection, Java code can obtain information about, and performoperations on, data fields, methods, and constructors of loaded classes. Of coure, there are security restrictions. The reflection API (encapsulated in “java.lang.reflect” package) represents classes, interfaces, and objects in the current Java Virtual Machine. Using the reflection API in tandem with

Hide Implementation Details of Stored Procedures

You can hide the implementation details of your stored procedures from end users of the application using WITH ENCRYPTION option. ENCRYPTION indicates that SQL Server encrypts the syscomments table entry containing the text of the CREATE PROCEDURE statement. The WITH ENCRYPTION clause hides the text of a stored procedure from

Create a Label With Underlined Text

The following class will give you a label with underlined text. public class UnderlinedLabel extends java.awt.Label { public UnderlinedLabel() { this(“”); } public UnderlinedLabel(String text) { super(text); } public void paint(Graphics g) { Rectangle r; super.paint(g); //here’s the trick r = g.getClipBounds(); g.drawLine(0, r.height -this.getFontMetrics(this.getFont()).getDescent(), this.getFontMetrics(this.getFont()).stringWidth(this.getText()), r.height -this.getFontMetrics(this.getFont()).getDescent() ); }

Create an Array of Functions in Java

Java doesn’t offer direct support for pointer to functions. But this doesnot mean that you cannot have a set of functions that can be accessed via amapping index. The code below shows you how to create an array of functions. First you’ll need a generic Interface like: public interface Function

No more posts to show