September 21, 1999

File.createTempFile()

Question: I am attempting to use createTempFile and it works fine with JDK 1.2.2,but IE 4 and 5, and Netscape give me the following error: java.lang.NoSuchMethodError: java/io/File: methodcreateTempFile(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; notfound. Why is this? Answer: The latest version of Java supported by Microsoft Internet Explorerand Netscape Navigator/Communicator is JDK 1.1.x.File.createTempFile() is not

ProgressMonitor

Question: How do I use the ProgressMonitor class? Answer: The ProgressMonitor class is a convenience class that saves you fromthe hassle of creating your own dialog with a JProgressBar. It willpop up a dialog containing a JProgressBar that displays theprogress of an operation. ProgressMonitor will only pop up themonitor after

Problems with VB6, Access 2000 and ADO

Question: I am doing a project where VB6 talks to Access 2000 thru ADO. I am using a login dialog to obtain the username, password & DSN (ODBC Data source name) to connect with the Access 2000 database. The code for this works fine when using it to connect with

The new Operator

Question: Is it necessary to check return value after a “new” statement?Does it return null when it cannot allocate any more memory? Answer: You do not have to check the return value of the new operator.Unlike C, where malloc() will return NULL if it fails, the Javanew operator will throw

DataGrid

Question: I want to extract data from a specific column in a grid control. When the user selects a record in the grid, I want to take the data from the first column of that record and use it in a recordset that opens another form. Should there be a

Guidelines for Handheld Computer Developers

The proliferation of handheld devices and embedded systems revives old programming and design considerations that existed in the olden days, when every byte of memory and every CPU cycle counted. The following guidelines can be useful for programmers who aim at the handheld devices market niche. Be Prepared To Deal

Improve Performance by Putting Loop in a Query

Most applications contain a loop that contains a parameterized query, which is executed many times depending on some logic. This requires a network round trip between the computer running the application and SQL Server. You should consider putting the loop inside the query instead. Create a single, more complex query

Test the Execution of a T-SQL statement Using the Value of @@ERROR

When SQL Server completes the execution of a T-SQL statement, @@ERROR is set to the value 0 if the statement is executed successfully. Otherwise SQL Server returns an error number. Remember that @@ERROR returns the number of the error message until another T-SQL statement is executed. Because @@ERROR is cleared

Avoid Using Refresh() Method

Refresh method of Parameters collection is used to populate the Parameter objects in the collection. This method queries the data provider to populate the collection with Parameter objects containing specific details of the parameters. After execution of this method, you can access this collection to stuff in the values of

No more posts to show