December 5, 2000

DevX - Software Development Resource

Testing for Closed Socket

Question: Is there any way to test if a socket is still open without writing to it? Answer: Despite being relatively easy to use, the Socket class is not implemented

DevX - Software Development Resource

Updating HTTP Headers

Question: In the first servlet we set the value for HTTP header as below: response.setHeader(“SessionKey”,”SessionValue”); In the next servlet we tried retrieving the above set header value as: request.getHeader(“SessionKey”); We

DevX - Software Development Resource

Use a VB Label as a Web Link

I like the idea of clicking on a VB label that looks like a Web anchor and pops up the Web browser pointing the user to the page. Here is

DevX - Software Development Resource

Union Structure in Visual Basic

When using C++, the Union enables programmers to look at the same memory area from different perspectives. The same is possible in Visual BASIC. There is an LSET statement that

DevX - Software Development Resource

Sort The Contents of an Array

Private Sub BubbleSort(varArray As Variant, bAscending As Boolean) ‘Option Base 0 is assumed Dim HoldEntry As Integer Dim SwapOccurred As Boolean Dim iItteration As Integer Dim i As Integer SwapOccurred

DevX - Software Development Resource

Null Handling in VB6

A simple way to get around having to handle Nulls in fields from recordset is to concatenate a zero length string at the end of the field value, as illustrated

DevX - Software Development Resource

Validate Text to Numeric

Public Function ValidateTextToNumeric(ctlToValidate As TextBox)’**********************************’This function tests the validation’for Numeric value of a given text’**********************************Dim strTextToValidate As StringDim blnNumericValid As BooleanstrTextToValidate = ctlToValidate.Text’*** Validation would be TRUE, in all the