May 27, 1999

The Default Value Returned From main()

In this example, main() is missing an explicit return statement. int main() { printf(“hello world”); } In C, when control reaches the end of main() without encountering a return statement, it returns an undefined value to the environment. In C++, however, main() implicitly executes a return 0; statement in this

Create ODBC DSNs Dynamically

You can use Visual Basic to create ODBC Data Sources Names (DSNs) dynamically for MS SQL Server. Simply place this line in a module: Declare Function SQLConfigDataSource Lib “odbccp32.dll” (ByVal hwndParent AsLong, ByVal fRequest As Integer, ByVal lpszDriver As String, ByVallpszAttributes As String) As LongFunction PrepareDSN(ByVal strServerName As String, ByVal

Use innerText in DHTML to Change Text on the Fly

With Dynamic HTML and Internet Explorer 4 and 5 you can update the text on the page after the page is rendered. The trick is to use the ID attribute as a unique identifier for the tag. As the user rolls the cursor over the text, the onmouseover event replaces

Avoid Empty Exception Handlers

One of the most frustrating experiences when running a Java program is an empty line where you expect information about a thrown exception. The programmer probably meant to catch the exception but did nothing with it. As a result, when the exception is thrown at run time, there is no