February 2009 Archives

I’m giving a talk at the MVP Summit in Seattle on Sunday afternoon. The session focuses on the premise that it’s easier to create user interface (UI) that includes formatting, aggregates, graphics and the rest with a report (or several). I’ve provided some of the technical details here.

No, the folks that built the Data Source configuration wizard that generates TableAdapter classes did not see fit to include the ability to set the CommandTimeout property for the numerous SELECT and DML Command objects they build for you.

To address this issue you’ll need to implement a Partial Class to create your own properties.

Bill Ramos announced in his blog that there is a new version of the (required) tool to manage SQL Server databases. It’s free and ready to be downloaded. Check out the Microsoft Download site.

Being a realistic guy, and based on past experience, I guess I need to put my sights on versions much further ahead to get anything incorporated into Visual Studio. Assuming Microsoft is still in business and Visual Studio still exists in 5 years, here is a clarification of a feature I’ve been asking for since VS 2000.

A developer on the public newsgroups asked an interesting question that I thought would have a fairly easy answer. Well, it turned out to be easy once Pablo Castro provided a hint.

SqlBulkCopy Revisited

| No Comments | No TrackBacks

Another developer asked how to import CSV files using INSERT statements. Instead of simply saying “Go get a copy of the book” (again), I decided to provide the example from the book’s DVD.

SqlBulkCopy leverages the considerable work the SQL Server team has done to make importing data fast (really fast). Consider that none of the data access interfaces are designed to do bulk imports—except DBLib. That is, until ADO.NET 2.5 when the SqlBulkCopy API was added to the .NET SqlClient namespace the only way to do bulk operations was to use the BCP utility, SSIS or a TSQL bulk operation.

Using INSERT statements can be fairly easy to setup but really slow down the operation. It’s like delivering coal with a Toyota 1/4 ton pickup. This is great until you have to move 800 tons of coal to the local power plant.

Here’s the code extracted from “Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)”

Early in March the MVPs are holding their annual summit on the Redmond campus. They want us to provide questions to be posed to the Microsoft managers who want to hear what the developer community thinks.

Please feel free to comment. I’ll pass on your comments to the folks on the hill.

  • What progress has been made to better communicate between the various divisions at Microsoft? Case in point (one of many): The new Local Data Cache has two separate mechanisms to create and initialize the class. This means that the same properties are exposed differently by the two tools (one is a wizard, the other a designer). Another point: Why is there such a difference between the functionality exposed by the Visual Studio Server Explorer and the SQL Server Management Studio Object explorer? For years (decades) we’ve seen a chasm between the data teams and the Visual Studio/Languages teams as they struggle over features and functionality. As a result we’ve seen repeated cases of duplicated efforts and different interfaces/explorers/tools that expose most of the same stuff.
  • Why was basic functionality removed from Visual Studio or not included when the technology evolved? For example, when Visual Studio 2005 shipped we lost the ability to drop a stored procedure on a form and generate a class that included a populated Parameters collection. This was not replaced in 2008. When Visual Studio 2005 shipped, there was no support at all for existing BI projects. This did not arrive until Visual Studio 2008 SP1. When the new ReportViewer control was released for VS2008 SP1 the ability to use the RDL generated by the BI tools was left off.
  • What emphasis has been placed on addressing the long list of issues that I and others have raised over the years. We keep hearing about how resources are tight but schedules keep getting shorter as release cycles are shortened but there seems to be more than enough time to introduce new, complex features for the largest IT organizations.
  • Why has the emphasis shifted from the small-to-medium sized shop supporting 1 to 25 developers to large IT shops that support hundreds of developers per project? Doesn’t Microsoft realize that the bulk of VB6 customers were in this area? Does Microsoft really think inventing yet another language or development paradigm will win back these disenfranchised customers?
  • Why does Microsoft seem to think it needs to “productize” development tools and push their development teams so hard so that needed functionality is left behind? By shortening the release cycle Microsoft makes it nearly impossible for adequate documentation to ship with the product. For example, look at the help topics that ship with the newest technology—too many of the topics are clearly machine-generated placeholders that were never filled in. Independent book authors and publishers cannot afford to pick up the slack with this degree of churn. When you make your product obsolete in 18 months, you kill book and training sales and the incentive to document the missing pieces not to mention the developers who have to constantly retool.

Despite the fact that you’ve used the encryption option on your SQL Compact database, if you don’t hide the password, it’s really easy to figure it out. I suggest you (at least) use an obfuscator or better yet, your own (private) technique to hide the value. Consider that there are ways to “reflect” the underlying source of .NET programs because they are stored as CLR intermediate language on your client’s system.

 

 

Can’t get Connected?

| No Comments | No TrackBacks

Perhaps the SQL Browser service can tell you why. Try running the sqlbrowser with the -c option and examine the results.

sqlbrowser -c
  SQLBrowser:  starting up in console mode.
  SQLBrowser:  starting up SSRP redirection service
  SQLBrowser:  failed starting SSRP redirection service  -- shutting down

In this customer’s case they had not opened the firewall to SQL Server Management Studio.

When annotating a video recorded with Camtasia Studio 6.0 (or any version after 4.x) you might want to take advantage of the SmartFocus feature to automatically add zoom and pan frames to the video. For code demonstrations, this really helps focus the user’s attention on the small bits that are hard to see from the back. Tip: remember to record the screen using the .camrec format, not .AVI. Apparently Camtasia needs the extra information kept in the .camrec files to manage the SmartFocus feature.

 

hth

Slow Query Response?

| No Comments | No TrackBacks

Rich Byham (MSFT) answered a developer’s question about slow response when a database is hosted on a remote system.

One possibility: Perhaps your SQL Server Native Client on the XP computer is
attempting to connect via named pipes. Named pipes is not enabled on the
client. After 85 seconds the connection attempt times out. Then it tries the
next protocol such as TCP. It connects right away and returns results.
Or the other way around trying TCP first and then named pipes?
Use SQL Server Configuration Manager on the server to see which protocols
are enabled.
Use SQL Server Configuration Manager on the client to determine the order of
protocol connection attempts.

Interesting…

hth

 

Lisa Feigenbaum says the Visual Studio team at Microsoft is asking for ideas for Visual Studio 2012 (the version after the now cast-in-plaster VS 2010). I did a search against my archive of suggestions I made awhile ago (okay, in 2006) to see which of the issues I raised then have been addressed and which make sense to be addressed in some future version. Ideally, Lisa will respond to say “Oh, sure. Those have all (or mostly) been addressed in the 2010 version.” but I’m an optimist.

Here’s the list. Consider that the Data Access team is at least influenced by the Visual Studio team and while these are not necessarily “language” issues per-say, they are developer issues that have yet to be addressed:

So, I've been lurking on the public newsgroups and noticed several authors and author wnanabes asking questions about what makes technical books sell. Some report sales in the 500-1000 range while others sell in the tens of thousands. I began musing on how to get one's book to sell more copies--enough to make it worthwhile. Perhaps these tips might help:

  • Write your book so it's not dependant on a specific product version. This makes your book more useful over the years as specific products come and go. Consider that the Knuth’s books are still selling after over 40 years.
  • Title the book so it's not version-specific. When bookstore folks see 2007 on a book in 2009 they'll want to pull it--regardless of how current the technology.
  • Write your book so it's unique. Perhaps this means making it product-specific but unless your book is the only source of information on the subject and the product is successful, you're going to have a short shelf-life. If you write on a time-sensitive topic (especially a beta version) make sure the book is done early. Every day you wait decreases sales by several percent. Once the beta product goes to RTM the bookstores and readers lose interest so have a follow-on book ready to go. This is more than twice the work of a single book that ships at RTM. Of course, shipping at RTM is virtually impossible as the products MS builds change so much from Alpha to Beta to CTP to RC to RTM.
  • Consider formatting the book as a textbook. If you get picked up by a junior college, technical college or university you can count on a lot more sales. This is really a lot of extra work and has a degree of risk involved as the retail (non-college) bookstores might not be interested in carrying a textbook not part of a local curriculum. This is one reason why these books sell for far more than standard titles.
  • Write your book so it contributes new material to the body of knowledge developers can find on Google. This means you can't simply restate the examples and topics in the doc unless you re-write them to make them functional (very tempting). Developers often need to get a second/third opinion about how to solve a problem.
  • Market and support the book yourself or at least work with the publisher to get seed copies in the hands of appropriate MVPs and User Group leaders.
  • When you're on a forum or newsgroup answer questions in your area and tell them that there is more information in your book. When you give a conference session, add a brief plug for the book. There is a delicate balance between self-promotion and providing pro-bono help—but I am no expert there—I often go over the line.
  • Get readers that like the book to post a review on Amazon. This might push the hesitant buyer into getting your book over another.
  • Make sure readers that complain are made happy. This might mean getting them a refund or helping answer their questions.
  • Go to the bookstore in your town and every town you visit and ask to see your book. Make sure it's shelved correctly. I went to the Notre Dame bookstore to discover my book was shelved with the graphical arts titles. Apparently the term "Visual Studio" threw the staff. If you find it, sign it (with their permission) and get them to sticker the book.
  • Work with your publisher to make sure the cover content is compelling. Don't assume the publisher knows what to put on the cover to get the developer to pick your book.
  • When you speak at a conference, work with the onsite-bookstore to setup a book signing. Help them sell the book by answering questions while in the bookstore.

Nope, despite the fact my picture is in the brochure, I’m not going to be there. It seems they have run low on funds and had to cut back on hotel rooms which cut back on conference rooms that cut back on speakers. I would make sure your favorite speaker is still attending. I expect he or she is as they kept the core folks that draw the most attendees. Perhaps I’ll see you in Vegas in the fall…

 

Patrick, I could not agree more with your editorial this month. Based on what I hear when I leave my cave is that Microsoft just doesn’t get it. Because of politics (no, not the Bush/Obama kind) and an old-school marketing and sales plan, Microsoft has also forced its own development teams to pump out new versions of SQL Server and other serious platform engines on a ever-shortening cycle. The same is true for Visual Studio and the languages teams whose development cycles seem to be totally consumed trying to get the Entity Framework working. This means the teams place less emphasis on fixing existing long-term bugs and making development of existing architectures easier. Over and over again we hear that “Microsoft knows what’s best for developers”.

Pages

Powered by Movable Type 4.38

About this Archive

This page is an archive of entries from February 2009 listed from newest to oldest.

January 2009 is the previous archive.

March 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.