Recently in Workplace, Standard etal. Category

After updating a working Vista system to Windows 7 several things happened that made what seemed like an easy transition to Windows 7 from Vista less than productive. I detail these issues to help you avoid the same issues. Yes, Windows 7 is worth the pain. It’s noticeably faster at every step, the UI is different but I get it. It’s more secure, but that’s a PIA sometimes—and that’s not a Primary Interop Assembly.

Progressive Business and Beta V have partnered together to present another series of developer-centric webinars. The current series focuses on SQL Server and Reporting Services and consists of six 90-minute talks given two a day for three days. The next scheduled offerings are September 9-11, October 13-15 and November 2-5th. See the following link for an outline and pricing details. Note that this series includes a copy of Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition) as well as a copy of Hitchhiker’s Guide to SQL Server 2000 Reporting Services.

Visual Studio, SQL Server & Reporting Services: 6 High Impact Training Sessions
This is a set of 6 seminars given in two parts one that focuses on SQL Server, the second on Reporting Services. This high-impact series of training webinars is for anyone who wants to leverage Visual Studio, SQL Server and Reporting Services best practices- learning what works, what doesn't and why. These sessions are for developers, architects and managers who want to know how and (more importantly) when to leverage the power and benefits of SQL Server and Reporting Services.

The webinars I’ve already recorded (and those I’m going to present) can be found by visiting this site. Look under the “IT” heading to see links to the content. The recorded sessions might be repeated in the future but the recording are available:

CLR Executables: Stored Procedures, Functions, Aggregates, & User-Defined Types
(presented May 13, 2009)

  • This session will discuss how to create CLR executables in Visual Basic.NET and C#. We'll see how to create CLR stored procedures, functions, aggregates as well as user-defined types. The session demonstrates CLR executable development through use of Visual Studio as well as SQL Server Management Studio.

Hitchhiker's Guide to Visual Studio & SQL Server Reporting 

(presented April 7, 2009)

  • This session discusses how Visual Studio developers can leverage the power of the Report Definition Language to manage and generate client-side reports or launch SQL Server Reporting Services reports. We'll discuss the latest MicrosoftReportViewer control as well as the Business Intelligence toolset exposed in Visual Studio 2008.

Managing and Writing High-Performance SQL Server Stored Procedures
(presented March 12, 2009)

  • Stored procedures have been recognized by database administrators and developers as the most efficient mechanism to access and protect SQL Server databases. When written and executed correctly, these server-side blocks of code can significantly improve performance, security and developer efficiency.


IMHO, I think that SQL Server Developer Edition should have a “switch” to permit developers (ideally on a connection-by-connection basis) to “select” which version of SQL Server is being executed. As most of you know the difference between the versions is all done with mirrors as the bits are the same for the most part. I can’t see that it would be that hard to expose that selection switch so a developer could test his application and the server-side executables on the version of SQL Server he or she is targeting.


Technorati Tags:

During the MVP Summit I had an opportunity to interact with members of the SQL Client team (in the SQL Server group). While I can’t talk about their future plans, I can talk about the suggestions I made:

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.

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)”

If you’re using the Visual Studio 2008 (SP1) Data Source Wizard or Local Data Cache wizard and you get a message like this:

Synchronizing the database failed with the message:
'Unable to initialize the client database, because the schema for table ...[list of tables]... could not be retrieved by the Getschema() method of DvServerSyncProvider.

Be sure to check the compatibility level of the targeted database to make sure it’s set to SQL Server 100 (2008). This should have been tested before the database was listed as supporting automatic sync support, but in any case, the exception message should show the reason for the error, not the cause.


To set a database’s compatibility level, open SQL Server Management Studio, open the database and choose Properties | Options. Use the drop-down to choose the right compatibility level. Of course, this assumes that the database is closed elsewhere (like in the Visual Studio Server Explorer). Once you change compatibility level, the engine rechecks the schema etc. to make sure there aren’t any compatibility issues.

Also, make sure you try to compile your project with x86 or x64 explicitly. I’ve discovered some disconnects with the default <AnyCPU> configuration setting. You can ignore the warnings when using x64 that complain that mscorlib.dll, and system.transcations.dll target a different processor. This is a known bug.

In some cases you might have to get the Local Data Cache wizard to rebuild the .SDF cache database to properly sync with the server-side table(s). Simply open the LocalDataCache.sync and make a property change and set it back once the sync has completed.





Powered by Movable Type 4.38

About this Archive

This page is an archive of recent entries in the Workplace, Standard etal. category.

SQL Compact is the previous category.

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