ASCII Conversion with ASP

The ASCII table was created to correlate each Roman character to a number. It has subsequently been extended to given a wider range of characters. Classic ASP had two commands to convert to and from ASCII characters and their number representation: char and asc. To convert the integer value, intASCII to the string value strASCII: […]

Read More… from ASCII Conversion with ASP

Removing Punctuation Marks From a String

Sometime ago I needed a function to remove the punctuation marks from a string in classic ASP. The function created passed in the string to have the punctuation removed. Using regular expressions the unwanted punctuation was then removed. The function removePunctuation used to remove punctuation marks: Function removePunctuation(str) Dim regEx Set regEx = New RegExp […]

Read More… from Removing Punctuation Marks From a String

Database Column Type Codes

The following code may be used to derive details about the name, value and type for each column in the current row of a database table. <% Dim objFields As ADODB.Fields Dim i As Integer objRs.Open strSQL, strConnStr, adOpenForwardOnly, adLockReadOnly, adCmdText Set objFields = objRS.Fields For Each fieldF in objRS.Fields fieldName = fieldF.Name fieldType = […]

Read More… from Database Column Type Codes

URLEncoding a Query String

Adding database derived information to a querystring can lead to a badly formed URL which doesn’t translate the querystring parameters correctly. An example of a wrongly included character is the single apostrophe. To correct this, preventing a JavaScript error on the page, the data needs to be encoded with the server.urlencode( ) command. For example: […]

Read More… from URLEncoding a Query String