Tuesday, January 30, 2007

ASP.NET AJAX "Compatibility" Validator errors

The final version 1.0 has been released and ASP.net AJAX (notice the vanished ATLAS, although i'll miss it..)is out ! It is and has been fun to update pages to use AJAX, which usually went somewhat smooth and - the effect gained by some rather little work was worth every line of additional code. It was a bit of a pain though to migrate ATLAS to AJAX, but it took less than expected (about 1.5 hours for a medium-sized small Web Application) and it's well documented. Just look for the MS Word ATLAS to AJAX Migration documentation. Thanks to Microsoft and the involved developers for all that, it has been a really fun time to watch the toolkit progress and to use it.



Unfortunatly, it's not all bushes and roses.. After migrating the application, installing an extra DLL in the bin folder on the hoster's web server (it's being installed to GAC locally, which in my opinion doesn't make sense (from a not so experienced developer's point of view), the app seemed to be fine and i went off on a holiday. I was not convinced though, that the application would now run fine inluding the migrated code/web.config and the new DLLs it would give me in a new AJAX project.



After a few days, a friend called to say that one rarely used page wouldn't work anymore, it used CompareValidator amongst others. Fortunatly and fascinatingly enough, a wireless network was around (and although being at the other end of the world on a beach vacation, how could i resist to fix that issue... :-) next time i'll leave my notebook at home... NOT) and i decided to look for others having the same problem. And VoilĂ , even an MS blog writer blogged about this exact problem, and pointend me to an additional download to store into the BIN folder.



Well, it all works, which is cool. But the aforementioned issue seems typical (sorry MS but that's my opinion). Apparently when MS released the ASP.net AJAX final release, they decided to take out the DLLs for AJAX Validators within UpdatePanels. The DLL was supposed to be shipped by Windows Update as we speak. But MS got delayed and silently postponed that work to some later time. So the DLL wouldn't be installed anywhere, leaving one unable to use AJAX Validators, among other controls, anymore... Now, the twist is that that DLL will (...) come out in the next two weeks. Why MS had decided not to communicate the substantial mishap to their "user-experience" conscious users probably remains a riddle...

You can get an extra DLL, don't worry, and using that one seemed appropriate and hassle-free.

(see http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx)



Just how can it be that MS cancels a rather important and widely used DLL, doesn't mention it (at all ?) in the CES consumer show or in the migration document ?!



Also, it's being promised that on the servers, a replacement DLL will be installed (into GAC i assume) by Windows Update, but MS couldn't make it in time.



Tuesday, January 09, 2007

.net DataView Filter conditions and ignorecase & oracle

First of all, Happy New Year and all the best for 2007 ! It all looks fairly good around here and plenty of work is around.

To start off in the new Year, while developing a CAB / Smart Client Software Factory application based on Oracle, I was facing the same problem twice and can't wind myself out of solving it.
The problem is simple: A DataView containing several rows with columns holding Integer (numerical) values and strings. For one certain Use Case, the application needs to go through the Table and create a DataView that filters out rows that don't contain a certain string. As the user is always King and thus can enter lower- or uppercase search terms, we want to ignore the case and return everything that just matches his query. In SQL Server, you'd enter a Filter a la: " searchColumn LIKE 'searchTerm'". SQL Server knows by itself that it should ignore the case in this case.
(column = 'xY' takes case into account, while column LIKE 'xY' returns everything from xy to XY etc.).
Oracle doesn't... Even using the keyword LIKE causes Oracle to care about case. Now you'd say:" Ha, just uppercase both the search term and the column a la UPPER(column) LIKE (searchTerm)". Simple enough... BUT: Microsoft doesn't support such a keyword in the filter pseudo-query language...

There seems to be no decent solution for this so far... Well done Microsoft..... Parts of the .net Framework and the ideas behind it are truly great and awesome, but on some other ends, some developers/marketing guys definitely should have been a bit more attentive.

Maybe someone knows a solution that can be used for dataview filters in .net 2.0 ? i doubt it... unfortunately.