June 2004 - Posts
At work, yesterday we finished up our migration from SQL Server 7 to 2000. First, we had to move our production database to an interim server while they rebuilt the regular server. They finally got that done, so last night we went and moved everything back.
In our dev and test environments, we were having some issues with migrating our relationships. They were using the simple “Import/Export Data” wizards in Enterprise Manager, and the way it does it is it copies the table structure, copies the data, and then applies the relationships (could be difficult to populate the tables if a primary key doesn't exist yet).
The problem? When we were migrating, it was converting fields with nulls to 0s. Well, in a relationship, a foreign key of null is valid (not participating), however 0 doesn't exist (especially with identity fields). So when it went to apply the relationships, almost half of them were failing. After some investigating, we finally found the cause. The brilliant people that designed the original schema had the default value for a number of fields to be 0. All the stored procedures that insert the data use null, and 0 could never realistically get in there since the relationship would be enforced. But when migrating the data, it uses a regular insert, so it would convert the null to the default value. So! Be sure your default values for fields that are foreign keys isn't 0!
The second thing I learned is that there is a way to get data into a field that does not exist in the primary key table. If you go in and modify a relationship with Enterprise Manager, uncheck the “Enforce relationship for INSERTs and UPDATEs option”, you can go in and modify the field to any value you want, regardless if it exists in the primary key table. Then, you go back in, recheck that option, and it doesn't revalidate the data in the table. It will enforce the constraint on future inserts/updates, but does not validate the data that is already there. Interesting...
Had oodles of fun last night while working on reformatting my PC. A while ago, I'd made the mistake of installing the Visual Studio 2005 CP on my PC and it took over VS 2003. Then when I uninstalled it, it undid all of the file associations instead of resetting them to VS 2003. Plus, I'm somewhat of a purist, I like a clean install, and hate having old stuff linger around for a long time.
Either way, what I thought would be a relatively simple task became a pain. Ended up reformatting/reinstalling 3 times before finally getting everything right. I would install just fine, and it would boot up great. Then the first thing I do is go get everything from Windows Update. I'd get the updates, reboot, and then it wouldn't boot... it would take forever to load, and never actually make it. You know how the "Windows XP" logo with the scrolling bar kind of fades into view? I could see if fade in frame by frame with about a second in between each.
The first time, thought something got jacked (somehow), so I re-did it. The second time, I knew something was up. Then I noticed Windows Update had a new driver for my Silicon Image SATA chip for May 12th. Figure it probably just made it onto WU this month, and I knew I hadn't downloaded it before. Plus bad drive performance could be a reasonable cause. So reformatted again, went to Windows Update, and skipped the driver. Wa-la! Works just fine now.
So warning to others who have a Silicon Image 3112 chipset in their motherboard: download the new driver with caution.
Ohh, and BlogJet is pretty sweet.
It is so annoying when everybody where I work refers to SQL Server 2000 as “SQL2000”. Everybody! Even the DBAs call it that.
Counting down... 6.5 work days left here.
You rarely come across a combination like this... NewsGator and LookOut. Talk about ultra quick searching of RSS feeds and, well, everything! Glad I spotted this little piece of software in ScottW's blog.
I forsee many useful combinations coming shortly with the release of the Managed OneNote Importer API. I think Omar had a great idea. I would love to get a Trillian plugin that could log all of my conversations into OneNote. Organize it by service, user, and date/time of conversation. I would be in heaven if LookOut support OneNote. Ahh... I could only dream.
Now, anyone already started anything to dump a webpage into OneNote? I saw a while ago about dumping emails into OneNote, but no software (think because this wasn't out yet). Where is it? :(
Installed Rainbow and have been working with it to design a site for wedding information. One thing annoying about it is its layout/theme handling. It does everything through user controls and it can be a bit of a pain to get everything to work right. This is only at first, once you get the hang of it, it isn't as bad. The thing that gets me is you have your theme, and then you have your page layout. Aren't those one in the same? You change your theme and it changes the colors, some of the icon images, and the stylesheet. Then the page layout handles the header, footer, nav bar, etc. One kind of depends on the other. I changed the page layout to one of the ones that comes with it and it made the header and nav bar stuff a light blue and the theme was still a default yellow one. So if you wanted that page layout, you had to design your own theme with everything blue... or change the page layout to yellow. Kind of querky.
Once I got through that stuff, I went onto adding the content and was disappointed when I found there are no guestbook modules for Rainbow. At least none I could actually find. So what does any determined developer do? Write their own! I'd tried using the announcements module for it, and setting add access to All, but still got access denied if I wasn't a registered user. So I wrote a custom little guestbook module, based on the announcements one. It works super though. I'll probably package it up and make it available online on Monday. Figure there are probably some other people who'd like to use.
Started working on integrating nGallery with Rainbow this afternoon as well. Spent most of my time conceptualizing and brain storming on how to handle it, but started making some progress. Got it to show the main album listing page, but before I go any further, going to have to make some changes to nGallery.
First, need a new theme for nGallery. Can't use the default ones for an embedded setup. Second, would like to convert the .aspx pages for nGallery into controls / user controls of some sort. That way I don't have to duplicate them, I can just load them from within the module. Third, need to change how nGallery generates URLs. Right now, they're all just hard coded. Won't work... can't link directly to the nGallery pages. Need to change it to be sensative to its mode and generate the necessary URL based on if it is in standalone mode, Rainbow mode, .Text, IBSPortal, etc. That will be pretty. All and all though, getting a nice little road map to integration. Should be pretty cool!
You know you are a developer (or, rather, geek) at heart when your first throught after you get engaged is setting up a website for you and your fiancee to post wedding information, pictures, and other details.
So, last night I registered kenandtrish.com and going to work on getting it going tonight. Looking at using Rainbow Portal, since I want a simple CMS that is somewhat flexible, but not overkill, and easy enough for my fiancee to use. I was thinking about writing my own (and was kind of excited to), but figure my time is best spent elsewhere...
...such as on getting nGallery to integrate with Rainbow since I'll naturally use nGallery as the photo album, and would like it integrated nicely. Finally have a use for it, so now I guess I'll put the time into making it work.
Now, am I integrating nGallery because I got engaged, or did I get engaged so that I had a reason to integrate nGallery? :) I am just kidding! If my fiancee ever heard that, she'd just laugh. Lucky for me, she has a great sense of humor.
Scott Hanselman gives a great, brief description of a multi-layered software architecture and some reasons to use it. It astounds me how many developers do not use methods like this and often times, haven't never even seen a proper architecture. Most importantly:
Please, do resist the urge to open up a SqlConnection from your next ASP.NET page.
Academically speaking, they hardly touch on this in college. For Senior Project, they mention a three-tiered/layered software architecture when talking about the design documents we have to write, but never really describe it in detail. No classes I've ever seen taught or even mentioned it in any important manner. Thank god I knew what they meant and implemented it in my Senior Project, since none of my team members knew about doing things that way. At first, they didn't want to follow that methodology because it meant a slower upstart, but they definiantly liked it towards the end when it came to formal testing.
The worst thing about it is that often, they don't have a clue what it is. In our final presentations, many teams went up their, showed a diagram with a client, a webserver, and a database server and said they were using a three layer architecture because it was spread out over three machines, each running separate code (HTML, PHP/Perl/ASP, SQL). I just kept writing “hardware architecture does not determine software architecture, code does”. Too bad academics rarely prepares you for real life.
Just wanted to take a moment this morning to announce that on Saturday night, I proposed to my girlfriend, Tricia, and she (of course) said Yes.
We'd gone out to Scandia (kind of like a Golfland), where we had our first date, to play some miniature golf. Halfway through our second game, I noticed I was losing, so I went and placed the ring box in the hole while she was lining up for her shot. A few minutes later, she made her ball, and when she reached in to pick it up, she noticed the ring box. She then said "What's that?" and started poking it with her club. I told her to wait a minute, bent down to pick it up, and was on one knee when I opened it up and then asked her to marry me. She was completely shocked, froze stiff, and just kept saying "Oh my gosh, oh my gosh!"
And the rest is history...
For some pictures, feel free to check out my photo album.
More Posts