Sunday, February 15, 2009

Comcast Networking, Anyone?

It took me forever to work out my Comcast self-install kit. Connecting a computer directly to the modem, no problem (although watch out for tons of Comcast bloatware that comes with), but working out my network connection took a while. The solution was extremely easy, but to get there, it took reading a post by a very helpful network geek here http://ask.metafilter.com/49038/Unshackle-my-home-network. Check out the post by paulsc. The clincher was to wait for the modem to work out it's global ip (2 min) BEFORE connecting your router. Only then can your router figure out what ip's to divy out. Joy.

Wednesday, February 11, 2009

Javascript "Option" object not fully-functional in IE6

This is related to the previous post. In IE6, the following javascript command doesn't actually select the newly-created option for a drop-down:
myselect.options[myselect.options.length]=new Option("optionvalue", "optiontext", false, true);
Instead, you'll need to specify to select this afterwords using something like:
myselect.options[myselect.options.length]=new Option("optionvalue", "optiontext");
myselect.options[myselect.options.length-1].selected = true;

Internet Explorer 6 on Windows Vista

I've been dealing with a client which, like a lot of corporate America, is still using Windows XP with Internet Explorer 6. This is understandable given how long it takes IT departments to catch up with all the new protocols for a new operating system and browser. However, that means we as developers need to make sure we still test web projects out on IE 6 as well. How do we do that though in Vista?

Microsoft Virtual PC image just for this purpose here http://www.microsoft.com/downloads/details.aspx?familyid=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=en. Just select an IE browser version and download. You'll then need to install MS "Virtual PC" found here http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx. After installing Virtual PC, create a new virtual machine, and select the virtual hard drive you downloaded in the first link.

Sunday, February 8, 2009

SQL Syntax: MySQL vs. Oracle

This may seem obvious to a lot of folks, but I never realized that a lot of syntax I assumed was standard SQL syntax is only specific to MySQL. So I assumed something like "UPDATE table SET field = 'Damian\'s Text' WHERE id = 1;" would work in Oracle, but no such luck. Two single quotes does the escape trick in Oracle rather than a backslash. Not to mention Oracle requires a "COMMIT;" after any insert or update (and maybe other commands).

You can also forget about using LIMIT within your statements in Oracle. Again, this was another function I thought was standard SQL. ROWNUM does a similar thing, but in a more convoluted way.

Bottom line, if you're used to MySQL, you may have to check a bunch of your syntax to see what works with Oracle, and vice versa. There's got to be a page out there that shows syntax differences between these two (and other) database types.