Tip Bank

DevX - Software Development Resource

Single Quotes in Queries

Question: When using PowerBuilder as a front end for doing SQL queries, I get the following pop-up message when I look for someone with a single quote in their name

DevX - Software Development Resource

Creating a Client E-mail List

Question: I am trying to create a client e-mail listing to go out to all our company clients. What would be the easiest way to do this? Answer: The easiest

DevX - Software Development Resource

ReplaceWord – Replace whole words

‘ Replace a whole wordFunction ReplaceWord(Source As String, Find As String, ReplaceStr As String, _ Optional ByVal Start As Long = 1, Optional Count As Long = -1, _ Optional

DevX - Software Development Resource

InstrWord – Search a whole word

‘ Return the next occurrence of a whole wordFunction InstrWord(start, Text, search, compareMethod) As Long Dim index As Long Dim charcode As Integer ‘ assume the search fails InstrWord =

DevX - Software Development Resource

Soundex – Determine the phonetic code of a word

‘ The Soundex code of an alphabetical string” you can use Soundex code for phonetic searches’ Beware: this isn’t bullet-proof!” UPDATE: this version corrects a bug in the original routine’

DevX - Software Development Resource

Drop the Parentheses in a VBScript Sub

Beginners are sometimes stymied when they get error messages on code that works perfectly elsewhere. For example, this code produces the error message, “Cannot use parentheses when calling a Sub”: