February 26, 2008
@ 10:51 AM

Tomorrow I will be presenting a talk on Attributes  & Reflection and Mike Murphy will be presenting on Windows topics at the .NET Valley user group meeting at the Univ of Scranton.  Event details are here. See you tomorrow.


 
Categories: Community

February 12, 2008
@ 10:11 PM

I have a particular machine that has had some issues when trying to use a few VS 2008 features.  If you come across this post searching for answers hopefully it will save you some time.  Hopefully this post will save me some time too, because my chronic amnesia tends to have me forget all but the last 30 seconds of my life.  :) 

The fix first:  For both issues here, I needed to uninstall all VS 2008 add-on components (like EF, EF tools, Ajax, .NET 3.5 preview, etc...) VS 2008 itself, then .NET Framework 3.5.  Then I reinstalled VS 2008, which reinstalled the framework.  After that I could install the later components/add ons.

The "whys" next: I had at least the last VS 2008 Beta on this machine, and it seems that both problems are tied to it.  I did follow all instructions for uninstalling and reinstalling VS 2008 as is posted at ScottGu's blog which I'll repost here:

"Installation Suggestions

People often ask me for suggestions on how best to upgrade from previous betas of Visual Studio 2008.  In general I'd recommend uninstalling the Beta2 bits explicitly.  As part of this you should uninstall Visual Studio 2008 Beta2, .NET Framework Beta2, as well as the Visual Studio Web Authoring Component (these are all separate installs and need to be uninstalled separately).  I then usually recommend rebooting the machine after uninstalling just to make sure everything is clean before you kick off the new install.  You can then install the final release of VS 2008 and .NET 3.5 on the machine.

Once installed, I usually recommend explicitly running the Tools->Import and Export Settings menu option, choosing the "Reset Settings" option, and then re-pick your preferred profile.  This helps ensure that older settings from the Beta2 release are no longer around (and sometimes seems to help with performance).

Note that VS 2008 runs side-by-side with VS 2005 - so it is totally fine to have both on the same machine (you will not have any problems with them on the same box).  "

The errors:

1) Visual Studio 2008 Designer error: "method not found Boolean system.web.ui.design.viewrendering.get_visible()"

Upon opening an .aspx page and trying to use either the full Design tab or the Split tab, I would get this error inside a small gray box for each control instead of that control's design surface rendering.  After some searching, I came upon this bug report on MS Connect, which had two options - 1) uninstall all things related to VS 2008 and resinstall, (and what's more fun than that?) or 2) Wait for Vista SP1 or install what version of SP1 beta/ctp is available now, which will require you to un/reinstall later anyway.  The workarounds at the connect site work, or if you can wait, then Vista SP1 should fix this issue.

2) Entity Framework error: "Package VC++  Resource Editor Package has failed to load properly" would display whenever I would try to either add a new ADO.NET Entity Data Model via the wizard or whenever I would open and try to edit .edmx files.

I got nowhere searching for this error.  This error has some similar issues related to it, but not quite for this problem.  I had taken the issue to some email lists and forums with no response, or nothing helpful (but thanks, anyway).  Perhaps the VC++ is used in C# and VB.NET Apps for the purpose of editing resource or designer files, which I am going to assume are needed at least on some level with EF tools.  However, when I disabled this package, no other resource or designer intensive parts of VS bombed. 


 
Categories: .NET | ADO.NET | Visual Studio | Visual Studio 2008

February 12, 2008
@ 07:42 AM

Yes, those people, the ones who have had a substantial impact on my career, and on life in general.  Andy, Dani, Peter and other have shared their thoughts, and now it's time I do the same.

The folks:

Of course the majority of working persons will claim that their parents had a substantial effect on their careers, but the important thing is to state exactly what influence I had received from them.  While my mom never had a career outside of the home and didn't weigh in on these sort of matters, my father was a 30+ year welding teacher at the local vocational-technical high school and he was always guiding kids toward professional careers and helping them with all things employment related.  When I was starting out my software development career Dad pointed out IT every job in the newspaper, and constantly gave advice on everything from how to apply to jobs to the best interview strategies and how to navigate office politics, which aren't nearly as cutthroat as school system politics.  Both parents have always supported us, and the odds I would be where I am today would probably be much lower without that support.

Margaret Price:

Margaret was my high school data processing[*] teacher who never for a moment thought there was anything I couldn't do, and made sure I knew it.  "Don't worry about it, just do it - you'll get it done.", she would always say. From the very beginning, Margaret has been a pillar of support, and was that one person who wouldn't allow me to whine or grumble myself into any sort of self pity when things didn't go as I thought they should. Margaret has also been a technical mentor, who has encouraged me to feed my hunger for learning new languages, technologies and the like.  It is because of Margaret that I have a drive to help others, to teach, and to mentor.

Henry Marchetti:

Henry was my first boss in a real, formalized IT department.  Henry was a tough but fair boss, and he drilled into each employee the importance of quality, integrity and customer service above everything else.  Our team actually had to read customer service magazine articles (which we would groan about at the time) but in hindsight I'm glad we had to do so. Henry made sure I was well aware that people who use my software are my customers and I need to treat them as such with the respect that customers deserve.  I may often joke about users during talks and classes, but in all reality it's no joke as you're paid because they use your product.

My Students:

Believe it or not, over the years, many, many students have greatly influenced my career.  I see all kinds of people representing every sort of company, and every situation out there.  I'm thrilled to be behind the podium, as every class contains valuable learning experiences for me (and hopefully, my students too).  Students have been demonstrating such vastly different concepts, thoughts and implementations of technologies than the vendors would have in their courseware.  I could have nothing less than widened horizons because of them. Thanks, students!

[*]yes, they did call it data processing, and that S36 was darn great technology at the time!


 
Categories: Misc

In my previous post, I showed some ways to query system objects in SQL Server.  If you switch between MS SQL and other databases, that's the way to go, as the information schema views comply with ANSI SQL-92 standards.  But there is another way to query information from MS SQL Server system catalogs it's by using objects called catalog views.  There's a boat load of these views available, mostly starting with 'sys' and they are queried as SELECT cols from sys.<viewname>.   If you have SQL Management Studio installed, you can find them under the Views->System Views node.

Here's a great starting point for writing your own TSQL catalog views.  But I will use the same samples from my previous post here, but rewritten to use the catalog views instead.

Retrieve a listing of tables in a database:

SELECT * FROM sys.tables

SELECT * FROM sys.views

Retrieve a listing of all the columns in a table (and their basic data types):

SELECT c.name AS column_name,c.column_id,t.name AS type_name,t.is_user_defined,t.is_assembly_type,c.max_length,c.precision,c.scale FROM sys.columns AS c JOIN sys.types AS t ON c.user_type_id=t.user_type_id WHERE c.object_id = OBJECT_ID('products')

Retrieve the primary keys of a table:

SELECT c.name AS column_name,c.column_id,t.name AS type_name,t.is_user_defined,t.is_assembly_type,c.max_length,c.precision,c.scale FROM sys.columns AS c JOIN sys.types AS t ON c.user_type_id=t.user_type_id WHERE c.object_id = OBJECT_ID('products')

Retrieve the foreign keys of a table (separate queries for PK/FK retrieval needed)

SELECT c.name AS column_name,c.column_id,t.name AS type_name,t.is_user_defined,t.is_assembly_type,c.max_length,c.precision,c.scale FROM sys.columns AS c JOIN sys.types AS t ON c.user_type_id=t.user_type_id WHERE c.object_id = OBJECT_ID('products')

Retrieve a listing of stored procedures:

SELECT * FROM sys.procedures

I keep the scripts from the previous post (and other scripts) around as I used to do much more with a variety of databases, plus I've just had those scripts hanging around for a long time as .SQL files.  However, I do use these catalog views as well, as they are quite easy to work with - and the typing's easy too!

There's a great FAQ on using these views, which I keep in my bookmarks so I can frequently access, then copy and paste from when I have to work in SQL Mgmt Studio/Enterprise Mgr.


 
Categories: SQL | Tips