Categories
SQL Server

SQL Server 2000 UDFs and GETDATE()

After trying and trying we researched to understand why SQL Server refused to let us run GETDATE() inside a user-defined-function. This is why:

User Defined Functions cannot be used to modify base table information. The DML statements INSERT, UPDATE, and DELETE cannot be used on base tables. Another disadvantage is that SQL functions that return non-deterministic values are not allowed to be called from inside User Defined Functions. GETDATE is an example of a non-deterministic function. Every time the function is called, a different value is returned. Therefore, GETDATE cannot be called from inside a UDF you create.

(From DatabaseJournal.com)

Share
Categories
Java

Jakarta Commons FileUpload and file names

File this under argh!

We use the Jakrata Commons FileUpload to manage J2EE’s weakest link – file uploads.
So naturally, like an narrow-minded developer I test the functionality with Firefox and voila, the upload works. Wrong, and in a beautiful fashion it is the client who finds this out. It appears that Internet Explorer provides the path name for a file being uploaded differently than Firefox does. That is because when you ask FileUpload’s FileItem getName() method for the file’s name what you get is:
Firefox: filename.xyz
IE: C:\firstdir\another directory\more directory\you get the idea\filename.xyz

Beware!

Share
Categories
Java

Eclipse 3.0 Tail/LogWatcher

Upgraded to Eclipse 3.0 just so we can enjoy MyEclipse‘s nifty new trinkets (JavaScript code completion!!!).
Eclipse 3.0 failed to install on my machine for some bizarre reason but today I downloaded it again and used a different zip program to extract it and voila, it works. A nice plug-in for Eclipse 2.0 was Eclipse Tail but sadly it does not work with Eclipse 3.0.
A short search dug up an alternative – LogWatcher. Works the same and allows you to follow the long traces and output from Tomcat or any other application server.

Share
Share