Thursday, February 26, 2004

Another sticky problem

Please, comments are more than welcome.

I have 2 tables, SubjectData and Orders. Orders contains order information for each of the subjects in SubjectData.
However, in my win form, I want the user to navigate the Orders table, yet be able to view the SubjectData information. All of this will be shown in Textboxes.

Any ideas folks?

Also, I have a stored procedure question. Why does this give me errors:
SET @ParmDef = N'@FieldID int, @FieldActive bit, @Retain bit'

SELECT @SqlCmd = JobFieldUpdate FROM JobTypes WHERE JobTypeID = @JobTypeID
--@SqlCmd is a string representing the stored procedure name.

EXECUTE sp_executesql @SqlCmd, @ParmDef, @FieldID, @FieldActive, @Retain

Wednesday, February 25, 2004

A New Blog
Making great strides after help from Dennis Perlot from Franklins.Net. What a help it is to have a mentor. If you want specific training, even to finish a project, mentoring is great. It's like a warm fitting glove that helps you grab you work and take charge of your own destiny...

Well... I put Dennis' blog on my blog links section. Here it is. Welcom to Blogging Dino!

Monday, February 23, 2004

I'm sure he's gonna be razzed about this one!
Well, at least we know Rory Blyth uses a .Net Blog server. (I'd know those error messages anywhere.)

Looks like you need to walk your blog down to size Rory... 'Too many twinkies!'

Server Error in '/blog' Application.

Could not perform the requested operation because the minimum query memory is not available. Decrease the configured value for the 'min memory per query' server configuration option.

Wednesday, February 18, 2004

And back to DataMatch
But with training!!! Whohoooo! It feels good to know something. Don't feel quite so stupid anymore. I really did. You know, when you have a problem, and you know it must be something simple, but can't for the life of you figure out what it is!

Well... Dennis sat with me for 8 hours (plus an hour giving progress reports to the PHB) refining my databasing and teaching me better use of it in coding. I was embarrased to show him my Database. I have better ones, but this project is the oldest and therefore crummiest. It was Access, and very few relationships. (The Image Connection is running on a much better database, but not as good as what Dino helped me create.)

I got to give him a few ideas too it seemed, which felt pretty good. Ever have a database error and want to know what was in the parameters? Well, I had a method that walked the parameter collection and returned an HTML table with the parameters laid out. Dino took it and made a version that worked in WinForms and returned a string you could use in Query Analyzer (which I now feel more comfortable in).

So what did I learn? Refined database techniques, better skills with Visual Studio and MSDE tools, as well as some codeing procedures that simplify time coding. Also, I finally understand what to do for a Data Component. And I was shown real life n tiered architecture.

Cool thing is, is what I can do with it now. Like the data component. I can wrap that in a webservice, and viola! webservice data component... if need be. Lot's of things tucked away with.

Plus I found another N scaler!

Thursday, February 12, 2004

And one gripe for the day

COLD WATER! I hate turning on a faucet to wash my hands and waiting for THREE MINUTES for lukewarm water!!!
Time to fix the PC
K, you may have heard about the scary stuff out there right now. Fix it! Here: Lose Mydoom and it's horde

That takes about 1 minute or less. Do it or you will (to quote a blogger) 'be spanked, long and hard, and preferably with a porcupine that's been coated in cyanide'.

Interesting tidbits on Rory's blog today BTW. Any of you new programmers who have chosen to let me help you my like to learn some of this stuff. Not really VB, but it is programming and it is interesting.

MCAD... well... I got through the first Assesment test. The only two chapters I don't seem to need help on are 8 (Working with Windows Controls) and 15 (Configuring and Securing Web Applications), both of which I want to read more on anyway.

My worst chapter? 16, Testing, Debugging, and Optimizing Web Applications. Hmm... no wonder stuff works so crappy for me. I gotta fix it, and make sure it's gonna work right, right? Well, I got 3 questions wrong on Chapter one, so I guess I got my work cut out for me.

I got 20 out of 43 right. Hmm... 46%. That won't do at all. K, time to go!

Monday, February 09, 2004

Sorry Cameron

I removed Cameron's Visual Basic Blog from my list since he hasn't posted in a while and because I found Rory Blythe's blog. I'll see how that works for a while. (Also, I click from my blog to theirs so that my page comes up on their referral listing... )

Got my MCAD books today!!! Woohoo!!! Now to start pouring through those. Think I can do it folks?

Also, I'm going to meet with Dennis Perlot from Franklins.Net thursday. Hopefully I am going to convince my bosses to let me get some mentoring from him. Finally, some formal training to help me correct my ways! I'm psyched! You can check out Dennis here:

Friday, February 06, 2004

Can't wait to get the other site on SQL

I am tired of Access, or I am use to SQL. I have grown. I have seen the power of SQL and like it. It is so easy to build a complex query in SQL and let it handle all the data stuff... and just use my code to recieve and format data. I don't think I'll go back to puting queries in my code again.

And for those of you that have cringed at what I just said, I am sorry. I didn't know any better. But I am learning.

Hopefully I'll get my MCAD books next week. I am going to try to get MCPd. Yea for me. Any suggestions? Comment or e-mail me.

Wednesday, February 04, 2004

More SQL fun!

I'm posting this for anybody looking for how-tos, but also for my own memory's sake.

Once in a while you have a table that has a field you need to keep sequential. In this instance, we are grouping images, and the groups need to be in a specific order. I have one table that includes these groups. It has a GroupName field, the Photographer's ID, and a GroupSort field, which is used to keep them in order.

So let's say a certain photographer has 5 groups, Getting Ready(1), Formal(2), Ceremony(3), Reception(4), Family(5).
He decides that Formal doesn't need to be there. If you simply deleted Formal through SQL stored procedure or whatnot you would end up with this:
Getting Ready(1)

Not very sequential. So I did this:
@Phtg numeric(18),
@Group nvarchar(50)
DECLARE @NewSort numeric(9), @OldSort numeric(9), @TopSort numeric(9)
--Get the top Sort
SELECT @TopSort = MAX(dbo.Groupings.GroupSort)
FROM dbo.Groupings
WHERE dbo.Groupings.PhotographerID = @Phtg
--Get the current Sort
SELECT @OldSort = dbo.Groupings.GroupSort
FROM dbo.Groupings
WHERE (dbo.Groupings.PhotographerID = @Phtg) AND (dbo.Groupings.GroupName = @Group)
--Delete the group
DELETE FROM dbo.Groupings WHERE (dbo.Groupings.PhotographerID = @Phtg) AND (dbo.Groupings.GroupName = @Group)
--Change sorts if needed..
SELECT @NewSort = @OldSort + 1
WHILE @NewSort <= @TopSort
UPDATE dbo.Groupings SET dbo.Groupings.GroupSort = @NewSort - 1 WHERE (dbo.Groupings.PhotographerID = @Phtg) AND (dbo.Groupings.GroupSort = @NewSort)
SELECT @NewSort = @NewSort + 1

So first we get the last sort (@TopSort) and then the sort we are deleting (@OldSort).
We delete the old sort.
Then we start from the next sort (after @OldSort) and work our way to the last sort (@TopSort) shifting them down one at a time.

Now there may be a simpler way to do this, but I haven't found it yet. If you want some more info on this, you know where to find me.

Tuesday, February 03, 2004

SCO: Millions of lines of SCO source code in Leapfrog Learning Pads
Take a look at this parody article. Pretty funny stuff.

(Note: This is a link, meaning that I did not write it's content! Don't sue me because I thought it was funny.)
More to come on my work soon.