Posts

Internet Explorer 8 beta 1 is out

IE 8 from MS is now out in beta 1. I haven't had a chance to download and play with it yet but it's here. Download here!

JSP/Servlets vs ASP.NET

So if anyone reads this blog they know I write a lot of C# code. My work is currently looking at grabbing a new project using JSP/Servlets on Oracle rather then ASP.NET on SQL Server. I have no issue with the oracle, I hate SQL Server and think it's a kids toy compared to oracle. However I haven't written much java but from what I've read it seams pretty easy to write JSP/servlets. There seems to be a speed debate over the two so here are my two cents. ASP.NET I feel is not scalable. The project I'm working on takes 5000 users concurrently on a regular basis and it gets hammered on performance. We've looked and looked and the way microsoft suggests you do things works great for small projects with low users. But for enterprise level stuff asp.net has to be done in a radically different manner. So while you can get a web page up and running pronto it can't scale worth shit. We are currently struggling to implement these kinds of changes. Java on the ot...

Bad programmer, Bad!

Ok so I posted some javascript for a numeric only textbox and it wasn't working. Someone posted a comment about it so I took a look at it. Sure enough the whole thing was boned. Hopefully I didn't lead anyone astray or anything. So I fixed the script and tested it and found it works now. So if anyone wants to read the new script it's over here: JavaScript post

Saving Changes to a DataTable bound to a DataGridView

Ok, So I'm working on app that binds a datatable to a data grid view. Normally you would just edit right in the grid and be done. However our table has too much data to edit right in the grid so instead users have to click a row on the grid to load a details panel below the grid. This works great except I noticed changes made to the last row weren't being saved. This is because the grids don't commit changes to their datasource unless a new row is clicked. So after a few hours of digging I found this bit of code worked very well. // commit all our changes to the datasource of our grid if( dataGridViewVariables.BindingContext[_tableEditVariables] != null ) {   dataGridViewVariables.BindingContext[_tableEditVariables].EndCurrentEdit(); }//end if Check that the object in this case a data table being used to bind exists. And if it does call the end current edit on that object. However if you're binding to a custom collection of objects I believe you need to...

Firefox 3 Beta 3 is in the wild

Ok so Firefox v3 has release a new beta version 3. I have downloaded it and will see if the memory issues are still improving. Download here

Using the ItemDataBound event with a DataReader vs DataTable/DataView

A little while back I was blogging about how we were switching over to datareaders for getting data back from our database. Well it was working fine until we noticed on some of our pages data wasn't being calculated correctly. This was traced to the ItemDataBound event used in our grids/repeaters not working correctly. With a datatable/view we would cast the e.Item.DataItem as a DataRowView; which works just fine. However datareaders when being databound can't be cast as DataRowViews. You have to use the DbDataRecord class. Afte switching from the DataRowView to DbDataRecord in the ItemDataBound event everything works just like it should. DbDataRecord is in the System.Data.Common namespace. Make sure you are importing that namespace if you haven't already. So to summarize it: Binding Object What to Cast to in ItemDataBound event DataReader DbDataRecord DataTable DataRowView DataView DataRowView

Notify Icon Text vs BalloonTipText

Ok so I have a small application that shows a users ip address via a tool tip when it sits in their system tray. Everything is going fine until someone sends me a bug that there was a problem. Investigating this I find that the method I was using to display tool tips in the system menu is somewhat flawed. I was using a notify icon control to show the tool tips while in the system tray. This works but I was setting the Text property of the control like this: // old way of setting text, with 64 character limit this.notifyIcon1.Text = "Show me in the toolbar"; This works but only for up to 64 characters. When I was designing the application I was thinking about ip addresses using the v4 format not the v6 format. Sure enough v6 ip addresses kick out more then 64 characters a lot of the time. So the search was on and I found using the balloon text can show more data but is a wee bit harder to use. Balloon tool tips don't show automatically like the text does. You h...