Deleting rows in a child DataViewGrid

January 23rd, 2008

When working with VB 2008, I set up a Parent/Child grids on a Windows form using LINQ to SQL.

What happened is when I try to delete a child row (i.e. An “order” for a given “Customer” where customer is the parent and Order is the child), I get a message similar to this:  “An attempt was made to remove a relationship between a Customer and a Order. However, one of the relationship’s foreign keys (Order.CustomerID) cannot be set to null”. 

I regularly read Beth Massi’s blog (Beth is a program manager with Microsoft, and has a great series of “how-to” videos using VB, LINQ and a few other technologies - it’s great you should check it out at http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx?wt.slv=topsectionsee).  Beth is extremely good at being able to explain “how-to’s” when it comes to technical items such as VB - she breaks everything down into an easy to follow step-by-step format.  Also, it’s really nice that someone so proficient focuses on VB  and LINQ too.  Anyhow Beth has a blog posting that addresses this exact problem and it solved everything here for me.

So instead of going into a long and drawn-out explanation of what I did, I’m just going to give the link to Beth’s blog post where she does an outstanding job explaining the problem and the solution.  Make sure to check out her blog posting here:  http://blogs.msdn.com/bethmassi/archive/2007/10/02/linq-to-sql-and-one-to-many-relationships.aspx

By the way I resolved my issue as follows:  In addition to setting DeleteOnNull=”‘true” for the child table in the .dbml file, I also used the option to enable cascading deletes on the parent.  So this way, I can now just delete child rows (without having to delete the parent row) or, when I delete a parent row, all the child rows are automatically deleted too (this is OK in my application because I’m not really working with orders - so in my case when I delete the parent, I really do want all the children rows to be deleted too).

 Thanks goes out to Beth Massi - you’re a great help !

Silverlight Firestarter Event was Outstanding !!!

December 22nd, 2007

By Paul Grossman, PAULGRO Consulting LLC.

Hi everyone, it’s been a while as I am moving my blog over to be hosted on my own website (at blog.paulgro.com).

Last week I attended the Microsoft Silverlight Firestarter event in Philly.  The event was phenomenal (not to mention fun too - if you’re like me and can actually picture coding and website development as fun) !! I was floored at the amount of new information I learned by just spending a day with a bunch of great people. 

Silverlight is a brand-new Microsoft technology, which is aimed at taking the web user experience to a whole new level — Ultimate.  Nowadays, what sets one web site apart from the rest is the user experience.  Silverlight 1.0 was released this year and version 2 is due out next year.   You can check out more info on Silverlight at silverlight.net.

I am so glad I got to hear such authoritative and great presenters who spoke on topics such as:  Microsoft’s new Expression Suite of web development tools, XAML, Media Markers, AJAX and many demos and examples showing off this hot new technology.  I’m looking forward to getting right to working with Silverlilght to make the websites I develop have that “ultimate” user experience.

The presenters at last week’s event included greats such as:
Pete Brown, Tony Lombardo, Peter Laudati, and Dani Diaz

Thanks again guys for yet another great event, I appreciate all that you do.  I’m looking forward to the next Code Camp !

Microsoft Office OneNote 2007 - One of the most useful tools

December 13th, 2007

By Paul Grossman, PAULGRO Consulting LLC.

I’ve recently installed and started using one of the newer components of Microsoft’s Office Suite, called OneNote.  I first saw OneNote about a year ago when someone showed me OneNote 2003, the person using it was using it on a tablet PC so I just passed it off as a really neat tool for pentops.  Also, back then I didn’t have the software so I just dismissed it, thinking to myself that if I ever got a pen top PC I’d revisit it.  However I noticed that I have a copy of it when I got Office 2007 so I installed it and started checking it out.  I discovered that OneNote is not just for Pen tops.

After that, I was floored over how useful it is. Being that I’m a small business owner trying to develop new lines of services, I tend to do lots of research and I typically would find that activity a little frustrating because I’d discover information that should have been organized a few topics back and I didn’t leave space for it to add later. When information comes flying at me, if I can’t capture it in an organized way without losing track of the last thing I was working on, forget it. Or, I would use MS Word and find myself having dozens of separate document files just on one topic. Needless to say although with Word, I was able to insert information at the right places and that did help me get better organized to “absorb” new found information. I’d often get overwhelmed at looking at the serial list of many spearate documents (or on the other hand, having a single document with many pages) — again, it lends itself to be overwhelming.

Enter OneNote. Picture having an electronic Notebook binder with tabs and pages. You can see all the divider tabs at-a-glance and get and idea as to the structure of the information at hand. Also take this one step further with the ability to take each page and allow yourself to structure those pages to have sub-pages - all visible at-a-glance. If you were to have this ability your research and the eventual study of the information becomes much easier. Paper notebooks don’t give you that ability to have 2 levels of structuring (you just get to add in divider tabs but you really can’t break your pages into sub-pages whose structure you can see at-a-glance).

So basically, OneNote gives you the ability to electronically have a structure like a 3-ring binder notebook, but even better because you can have one more level of structure and organization that the “old-school” binder notebook doesn’t give you. Add to that, the flexibility you would get in Word (or really any other “editor”) where you can insert information (without having to “erase” or “re-write” pages of paper notes to make your collection of information easy to understand).

As if that wasn’t enough to get you to become more productive, OneNote tastkes it one-notch further with giving you the ability to organize entire topics into a separate electronic notebook. I’m always wearing separate hats and information comes at me fast and furious - that means that not everything comes in to me in a neat and orderly manner (everything I need for one topic just doesn’t all come together in a single stream of time - I am always going back and forth, and now I have the ability to capture it all without losing track of where I left off from any one given topic). You can also see all of your notebooks at-a-glance. To me, this is really a big plus. That means I can start a topic and give it its own notebook. Then when something disparate comes up, I can just start a whole new notebook and start filling that one up. I can easily switch back and forth between notebooks as I need to (it works like your typical “Workspace” type environment - really neat). The greatest thing I like is that when I’m gathering notes from the web or another electronic document, I can take a “clipping” of a web page for example and it’ll go right onto my OneNote page. This is better than just cut and paste (although you can still do that too - but now you can get text and photos pasted neatly onto your note page right from the web).

There is much more to OneNote than what I’ve used it for so far. For example, you can also record voice notes — and yes, even voice notes are searchable. So even conversations at meetings can be captured and put into your notes using OneNote. So the more I use it, the more I discover and it only gets better.

I know that just reading my words doesn’t really give you the best “picture” of the power of OneNote. So, check out this link and discover more about OneNote.

OneNote is included with Office 2007 Home and Student, Office 2007 Ultimate, and Office 2007 Enterprise. It’s also available for purchase as a single program as well.

I can’t say enough how excited I am about this boost in productivity thanks to OneNote. It’s among the most useful pieces of software tools I have on my computer !

Outlook sending messages that I really don't send. No viruses detected.

December 2nd, 2007

by Paul Grossman, PAULGRO Consulting LLC

Here is a message I’ve posted to the microsoft.public.outlook newsgroup:

I am having trouble with Outlook 2007 when I send an email message, it sends 4 additional messages that do not appear in my Sent items folder.

* I verified that there was only one message in my outbox before I click send/receive
* Status message at bottom right always says “sending 1 of 5″ (there is always 4 additional messages sent)
* I ran Virus scan (both McAfee) and Webroot SpySweeper and both found no traces of spyware, malware, viruses, worms, etc
* I have McAfee email virus scanning running at all times (no messages saying mail w/duplicate subjects sent)
* I changed my outlook settings so that send/receive is not scheduled nor automatic (I have to click send/receive to send messages)
* Also, I have not sent any read receipts, as I understand that might have been one reason… that’s not the reason in this case.

The only message that appears in my Sent Items is the one message that I actaully sent. The additional 4 that the status bar said it sent do NOT appear in Sent Items. There was also no additional messages in my outbox

This happens for every e-mail message I send.

How can I catch these extra 4 messages that are sent with every e-mail?
How can view what these extra 4 messages are? There is currently no way of either seeing these 4 messages nor detecting what they are.

I will check the newsgroups and let you know what I’ve learned. I will also be posting in the ICCA message boards as well.

Business Development and Selling

November 22nd, 2007

By Paul Grossman, PAULGRO Consulting LLC.

The ICCA Northern NJ chapter had its November meeting on Tuesday, 11/20/07. We had the privlege of hearing Matt Makowicz of Ambition Consulting speak about selling Managed Services. Matt gave some good insights on how to really interpret a prospect’s needs and / or problem during the initial sales meeting. Matt’s quite insightful about gaining the sale and I’m looking forward to reading his book “A Guide to Selling Managed Services”. The book has lots of specific examples toward the IT (technical services) industry but even us developers can benefit too from his insights. After all, selling is still selling - whether it’s widgets, IT services or software development.

The major projects I’m involved in include:

  • Course Administration for an educational institution
  • Maintenance and Enhancements for Sales and PR database applications
  • Enhance a website to have photo album functionality. Allow the site administrator to upload and delete photos to be displayed

The technologies being used for the above projects include MS Access, ASP .Net, and VB .Net. In future posts, I’ll be discussing some of the techniques I’ve used to make the various enhancements. I know that I’ve benefitted greatly from other bloggers and newsgroup posters so I’d like to share my experiences as well.

Have a great Thanksgiving …