Wednesday, January 31, 2007

Three Sample C# SSCE Sync Services Projects

As mentioned in my January 28, 2007 post, "Microsoft Releases Synchronization Services CTP," Rafik Robeal has posted the source code for C# demo applications that synchronize data bidirectionally between SQL Server 2005 [Express] (SS[X], server) and SQL Server 2005 Compact Edition (SSCE, client). Rafik is the primary Microsoft participant in the new Microsoft Synchronization Services for ADO.NET forum and writes MSDN's The Synchronizer blog. To build and run the three projects, you must download and install the Microsoft Synchronization Services for ADO.NET v1.0 CTP release of January 22, 2007, which installs a post-Orcas release of SSCE v3.5 and the Microsoft.Synchronization....dlls on your test machine.

The projects use simple orders and order_details tables that are empty to start. You add random rows to the two tables with buttons on a two-tab Windows form, optionally execute random updates and deletions on the SSCE client, and finally synchronize the client-side changes with the SS[X] server). Each base table has a corresponding tombstone table to track deletions.

Here's a screen capture of the main SyncForm.cs window displaying the order_details table: When you click the Synchronize button, the following window reports the results:

Following are brief descriptions of the three sample projects, each of which uses the same UI:

  • Offline AppDemo—Builder (released 1/25/2007) demonstrates basic Sync Services functionality by using the SqlSyncAdapterBuilder to generate a bidirectional SyncAdapter for each table that includes information on the base and tombstone table columns. SyncAdapters are similar to ADO.NET 2.0 TableAdapters. There's more information in Rafik's Demo I: Offline Application—SyncAdapterBuilder post and my earlier post gives some tips to get started on the right track.
  • Offiline AppDemo-T-SQL + SProc (released 1/28/2007) substitutes T-SQL queries and stored procedures executed by SqlCommand objects for the SqlSyncAdapterBuilder. Using T-SQL and SProcs provides exposes SyncAdapter code for customizing the process and gives additional insight into how SyncAdapters work. Documentation is in the Demo II: Offline Application—TSQL+SProc post.
  • Offline AppDemo—WebServices (released 1/30/2007) illustrates the N-tier approach by moving the server-side code to a Web service and wrap the client-side code to enable it to plug into the Web service's sync agent. Using a Web service complicates the installation, so be sure to read Demo III: Offline Application—WebService before attempting to build and run the project.

These three demo apps provide the basic code that you need to test two-tier and N-tier synchronization with more complex data structures. Hopfully the Sync Services documentation will arrive as promised in early February 2007.

Update 2/5/2007: Rafik provides a comparison of Sync Services with SSCE as the subscriber (client) and SQL Server 2005 Merge Replication with SQL Server 2005 as the publisher and SQL Server or SQL Express as the subscriber (Synchronization Services for ADO.NET Vs SQL Merge Replication). It would be interesting to compare a scenario with SQL Server 2005 as the publisher and SSCE as the subscriber.

Update 2/7/2007: Rafik has added a fourth OfflineAppDemo for concurrency conflict detection and resolution. See a summary with screen captures here. Get further details and download the project here. Technorati tags: , , , , , , , , .

Monday, January 29, 2007

U.S. Coast Guard Searching for Jim Gray off San Francisco Coast

1/29/2007: According to a brief story from Oakland's KTVU, the U.S. Coast Guard is searching the waters outside the Golden Gate for Microsoft Research's ultra-large database and transaction-processing expert Jim Gray. (Last Update 2/3/2007, 12:09 PST).

I happened to be scanning the Bay Area TV channels at about 5:15 p.m. today (Monday, January 29, 2007) when I saw a photo of Jim Gray and heard the last few words of a sound byte about his apparent disappearance after leaving San Francisco Sunday morning for a trip to the Farallon Islands in his 40-foot sailboat "Tenacious."

Update 1/30/2007, 3:45 p.m.: The "Search Intensifies For Missing Microsoft Exec" story from from KNTV (NBC 11 San Jose) includes quotes from Jim's daughter, Heather, video news clips, and a 10 minute raw video interview with Coast Guard spokeswoman Lt. Amy Marrs. The Marrs interview explains the status of the Coast Guard's search efforts as of yesterday.

A KPIX (CBS 5, San Francisco) story, "Coast Guard Steps Up Search for Missing SF Boater," says the Coast Guard "is expanding their search for him based on new information" that Jim enjoyed sailing north of the Golden Gate. According to reporter Anna Duckworth, the Coast Guard is adding another plane to the search this afternoon (Tuesday).

KGO-TV (ABC 7, San Francisco) offered similar coverage with its "Coast Guard Resumes Search for Sailor" story. The search was terminated at 3:15 a.m. Tuesday morning and resumed at sunrise. A later "Coast Guard Expands Search For Missing Sailor" article mentions two possible sightings at Stinson Beach, but searchers found nothing at this exclusive Marin County resort village a few miles northwest of San Francisco.

Update 1/31/2007: The Coast Guard reports that the search has been extended to an area from Monterey Bay to the Oregon state line. The boat was equipped with an emergency beacon and it hasn't gone off, according to the Coast Guard.

"Search continues for Microsoft researcher missing at sea" from the San Jose Mercury-News is a full length story datelined today. The San Francisco Chronicle ran a similar "Vast search off coast for data wizard" story. Techmeme has a link to an InformationWeek story by Charles Babcock.

KTVU's Patti Lee reported in a 1/31/2007 video clip that Jim wasn't scheduled to work at BARC "today or tomorrow" presumably meaning Monday and Tuesday. KNTV also offered a brief updated report.

Update 2/1/2007: The Coast Guard planned to call of the search as of this morning, according to KNTV's "Coast Guard To Call Off Search For Missing Sailor" Wednesday night story that says searchers are "'Stumped' In Search For Gray" and "Search for Gray Could Be Over" news segment, and a similar Associated Press story and segment from KPIX.

However, the Coast Guard said this morning (Thursday) that the search would be extended to 300 miles west of the coastline and south to the Channel Islands, west of Santa Barbara. KTVU's "Coast Guard Extends Search For Missing SF Sailor" story, updated this morning, and Jade Hernandez' related video segment tell most, but not all, of the story.

KGO-TV reported in yesterday's "Time Is Running Out For Missing Sailor: Coast Guard To Give Up Search" story by Heather Ishimaru:

Lt. Commdr. Jonathon Copley, U.S. Coast Guard: "He had no hard obligation at work, or at home, with his wife who was out of town until today, don't know if he did that, but know he loved to sail, we do know that."

And they have considered he might not want to be found.

Lt. Commdr. Copley: "People who don't want to be found, it's hard to find them, because all our models are based on people who want to be found."

At 11:44 a.m., KNTV updated this "Coast Guard To Suspend Search For Jim Gray Tonight" story based on a Coast Guard press release that quoted Lt. Amy Marrs: "To suspend a search is never an easy decision. We've covered the area Mr. Gray is likely to have been with the resources we have, but closing a search only comes after it has been determined we have done everything we can do to find someone." KNTV's Gavin Thomas reports that "[f]riends of Gray said they are prepared to hire private aircraft to continue the search if the Coast Guard calls off their efforts.

Update 2/2/2007: The Coast Guard suspended the search for Jim Gray as of 5:30 p.m. Thursday (2/1/2007) according to this USCG press release. KGO-TV's "Coast Guard Calls Off Search For Missing Sailor" story has more details, including the fact that Jims cellphone was active on the Cingular network at 7:30 p.m. Sunday, which indicates his location was within 10 miles of the shore.

Microsoft Research has an "Update on Search for Jim Gray" page with a link to a recently started Tenacious Search blog. According to this 2/2/2007 post, the private searchers had three planes in the air Thursday and planned to have four on Friday.

Update 2/3/2007: Today's "Silicon Valley’s High-Tech Hunt for Colleague" article by the New York Times' Katie Hafner summarizes the unsuccessful Coast Guard search and detailed private efforts with satellite imagery and aircraft. (The story hit Techmeme.) Eric Newcomer posts his reminiscences of Jim at Digital, Microsoft's Don Dodge recalls working together at Digital and Microsoft, and a reader describes a dinner with Jim while moored at The Spinnaker restaurant's dock in Sausalito.

The Tenacious Search blog has updates on the private search activities. Folks in Cal Berkeley's Electrical Engineering/Computer Science departments have produced a "Missing" poster. Amazon.com CTO Werner Vogels has added a "Help Find Jim Gray" post and there's a "Jim Gray Missing: Help find him by searching satellite imagery" Mechanical Turk task that request visitors to scan images for foreign objects that could represent "Tenacious."

Jim Gray's Contributions to Database Technology

Jim was graduated in 1969 from my alma mater, UC Berkeley, with the first Ph.D. degree awarded by the University's fledgling Computer Science department. He won the Association for Computing Machinery (ACM) Turing Prize in 1998 for his work in online transaction processing and was promoted to a Microsoft Distinguished Engineer in 2000. Jim was the founder of Microsoft's Bay Area Research Center (BARC) in San Francisco and subsequently became the manager of BARC's eScience group.

If you're a longtime reader of this blog, you've seen many references to Jim Gray and his TerraServer, SkyServer and other gargantuan database projects, as well as details of his early use of XML Web services to access terrestrial (TerraService.net) and galactic data. My "Build Real-Time Web Images" article in the August 2004 issue of Visual Studio Magazine described a Visual Basic .NET 2003 graphic consumer of TerraService.net Web Services, as well as Microsoft MapPoint services (requires free registration.) Jim was kind enough to review part of the article for accuracy.

Jim was a staunch proponent of large database systems constructed from interconnected low-cost commodity computers and cheap SATA disk drives called CyberBricks. I've covered CyberBrick technology in several magazine articles. My "Build Data Service Centers With Bricks" article for Fawcette Technical Publication's Windows Server System Magazine (May 2003 Tech*Ed issue) summarized Microsoft's tenuous commercial interest in CyberBrick technology.

Still Waiting for More News About the Private Search

Until we learn more, our thoughts and prayers go out to Jim, his family and his colleagues in San Francisco and around the world.

Update 5/2/2007: Mark Whitehorn has posted an eloquent "Tribute to Jim Gray" on the UK's The Register.

Friday, January 26, 2007

Microsoft Releases Synchronization Services CTP

The Microsoft Synchronization Services for ADO.NET v1.0 CTP release appeared without fanfare on January 22, 2007. The release contains "v1.0 early CTP" bits for the ADO.NET sync framework and and an updated SQL Server 2005 Compact Edition (SSCE) v3.5, the Orcas successor to the SSCE v3.1 RTM bits, which Microsoft released on January 11, 2007. Sync Services for ADO.NET's goal is to enable synchronization between any pair of data sources that have ADO.NET managed providers. The current code name for Sync Services is OCS (for Occasionally Connected Systems).

According to the download details:

Microsoft Synchronization Services for ADO.NET provides the ability to synchronize data from disparate sources over two-tier, N-tier, and service-based architectures. Rather than simply replicating a database and its schema, the Synchronization Services application programming interface (API) provides a set of components to synchronize data between data services and a local store.

Applications are increasingly used on mobile clients, such as laptops and devices, that do not have a consistent or reliable network connection to a central server. It is crucial for these applications to work against a local copy of data on the client. Equally important is the need to synchronize the local copy of the data with a central server when a network connection is available.

The Synchronization Services API, which is modeled after the ADO.NET data access APIs, gives you an intuitive way to synchronize data. It makes building applications for occasionally connected environments a logical extension of building applications where you can count on a consistent network connection.

The OCS installation folder is \Program Files\Microsoft Synchronization Services\ADO.NET\v1.0\, which contains Microsoft.Synchronization.Data.dll, Microsoft.Synchronization.Data.Server.dll, Microsoft.Synchronization.Data.Client.dll, and ReadMeSyncServices_ENU.htm. ReadMeSyncServices... has no useful content.

Documentation, Support and Sample VS 2005 Sync Projects

The download includes no white papers, tutorials, or other documentation for programming Sync Services. Microsoft says to expect documentation here for Sync Services in early February 2007.

In the meantime, there's a new Microsoft Synchronization Services for ADO.NET forum and an MSDN The Synchronizer blog run by Rafik Robeal. Rafik's blog has a link to Offline AppDemo-BuilderV1.1.zip, which contains a C# demo application that works with SQL Server.

Tip: If you install and run the Offline AppDemo.sln project be sure to read the readme.txt file in the ...\setup folder, select and run only the specified part of the demo.sql script with SSMS[X], add \SQLEXPRESS to the Server Machine text box if you're running SQLX, and click the Synchronize button to create the clientdb.sdf database in the location specified in the Client Database text box before you click any other buttons.

Steve Lasker mentioned in his January 23, 2007 "Sync Services for ADO.NET (OCS) CTP Now Available" post that the Orcas February CTP will include a Sync Designer and that he plans to "post a screen capture of the designer soon." If you check out Rafik's demo project, you'll see why the Sync Designer is a must. (Too much code required for a simple, two-table project.)

SSCE Backward Compatibility

The download details state that the SSCE v3.5 runtime bits install side-by-side with SSCE v3.1 on desktop, laptop, and Tablet PCs. The two SSCE installation folders are \Program Files\Microsoft SQL Server Compact Edition\v3.1\ (RTM) and \Program Files\Microsoft SQL Server Compact Edition\v3.5\ (CTP).

I've confirmed that complex (1,000+ lines) WinForm apps created with SSCE v3.1 RTM (file v3.0.5300.0, assembly v9.0.242.0) work fine with SSCE v3.5 from the Orcas January 2007 CTP (file v3.5.5277.0, assembly v3.5) and v3.5 in the OCS CTP (file v3.5.5305, assemby v3.5). Upgrading current SSCE 3.1 projects to v3.5.5305 requires removing the current System.Data.SqlServerCe reference, and adding a new v3.5.5305 reference by browsing to \Program Files\Microsoft SQL Server Compact Edition\v3.5\System.Data.SqlServerCe.dll.

Note: The 3.5.5305 version installs as expected with Windows Vista running under Virtual Server 2005 R2 SP1 CTP. This configuration isn't explicitly listed as supported by SSCE v3.5 in ReadmeSSCE35_ENU.htm. Version 9.0.242.0 failed to install completely under virtual Vista.

New v3.5 SSCE Features in the CTP Release

The SSCE v3.5 ReadmeSSCE35_ENU.htm file's "New Features in SQL Compact Edition 3.5 CTP" section list the following enhancements to v3.1:

  • Support for the timestamp datatype
  • Nested queries in the SELECT FROM clause
  • CROSS APPLY and OUTER APPLY operators
  • CAST function and TOP clause
  • Support for the ADO.NET Entity Framework and LINQ to Entities with System.Data.SqlServerCe.Entity.dll (under Orcas)
  • Enhanced table editor for VS Orcas can add foreign key constraints
  • Support for local transaction scope

Note: The enhanced table editor for VS Orcas didn't appear in my installation of the Orcas January CTP. A later Orcas build (February CTP?) probably is required.

Surprisingly, the new features did not include the expected removal of the 4-GB database size limit. The ssce:Max Database Size range remains 16 to 4091 kB.

The bits appear to me to be a stealth release. As of today (1/27/2007), there was no mention of Sync Services on the SSCE main page and there were no posts about Sync Services in the SQL Server Compact Edition forum until I added a message with a link. Microsoft might be waiting for initial documentation to be completed before promoting Sync Services.

Update 1/28/2007: Minor clarifications and corrections.

Technorati tags: , , , , , , , , , , , , , , , , .

Monday, January 22, 2007

More LINQ to XSD Rumblings

It's been quiet on the LINQ to XSD (a.k.a. "l2xsd") front since Microsoft Data Programmability Team program manager Ralf Lämmel announced the public preview on November 27, 2006 with the release of the Alpha 0.1 version.

Mike Champion gave LINQ to XSD a boost in his "Convergence Zones" 2007 preview for the future of XML post:

The better the XML is hidden, the more the bulk of the world likes it. Being out of sight, it's also out of mind. Few noticed that "Asynchronous JavaScript And XML" actually refers to the XmlHttpRequest API much more than XML content, so the substitution of JSON for XML as the typical bits on the wire format caused little concern. Actually that understates the case—most people are happy to use more familiar technologies instead of XML or in front of XML. What might we predict from this pattern?

  • I'll make a (self serving!) prediction that the LINQ approach of focusing on what is common across data formats will get more mainstream traction than will the notion that users want specialized tools for their XML data.
  • Tools that make it relatively easy to consume XML directly into programming objects such as LINQ to XSD will continue to mature technically and be adopted by pragmatic developers.

Helping LINQ to XSD to "continue to mature technically" is a new technical paper, "Programming with Triangular Circles," by Ralf Lämmel and Dave Remy, presented at the XML 2006 conference in Boston on December 5, 2006. Here's the introduction and abstract:

When deriving object types from schema types, developers are impaired by the infamous X/O impedance mismatch. We deliver a typed programming approach for XML that greatly reduces the impairment by leveraging rather than abandoning XML semantics.

Given the capabilities of OO programming, its maturity and generality, it is a sane expectation to adopt OO as the paradigm of choice for XML processing. To serve that expectation, one would map XML schemas to object models so that XML data can be processed through familiar objects. The first generation of mapping technologies has been somewhat disappointing and the term X/O impedance mismatch has been coined in this context. By devising a mapping that caters for XML-aware objects as typed views on untyped XML trees (as opposed to plain objects with fields), and by leveraging functional OO programming, one can actually deliver on the expectation to adopt the (enriched) OO paradigm for XML processing.

Ralf's "Style Normalization for Canonical X-to-O Mappings" paper for the ACM SIGPLAN 2007 Workshop on Partial Evaluation and Program Manipulation (PEPM 2007), held in Nice, France, on January 15 and 16, 2007 tackles "normalization of schema-organization styles and its support by automated transformations." Here's the first paragraph of the Introduction and the abstract:

This paper deals with the overall problem of mapping XML schemas to object models. (We use the term X-to-O mapping from here on.) More specifically, this paper devises transformations for normalizing styles of schema organization as a separate aspect of X-to-O mappings. This separation of concerns is helpful in attacking the so-called X/O impedance mismatch—the overall difficulty of viewing domain-specific XML data as objects of a schema-derived object model in a satisfactory manner.

An X-to-O mapping takes an XML schema as input and returns an object model as output; this object model is meant for programmatic, schema-aware access to XML data. The provision of X-to-O mappings involves various challenges; one of them is addressed by the present paper: variation in style of schema organization, which should not unduly affect the outcome of X-to-O mappings. We devise transformations for style normalization (and conversion); these transformations operate at both levels of the X-to-O mapping: schemas and object models. An important byproduct of the present work is to showcase functional OO programming as a viable setup for devising software transformations.

Ralf also presented at XML 2006 the LINQ to XML-based "API-based XML Streaming with FLWOR Power and Functional Updates" paper with this introduction and abstract:

We enable streaming for an in-memory XML API so that a convenient (declarative) programming model is preserved. Some restrictions are to be imposed on the streaming mode of the API, thereby achieving also predictability and controllability of the streaming power.

The size of XML trees that can be processed by an XML API for declarative, in-memory processing is bound by the available memory. As a result, certain scenarios involving huge trees or many processes on large trees may fail to be feasible with (declarative) in-memory processing; lower-level APIs for XML parsing and unparsing must be reconsidered. As a remedy, we enable streaming for an in-memory XML API so that the convenient (declarative) programming model of the baseline API is preserved. Some restrictions are to be imposed on the streaming mode of the API, thereby achieving also predictability and controllability of the streaming power. The presented development uses LINQ to XML (formerly called XLinq) as the baseline API and works out one particular API extension for a streaming-enabled LINQ to XML API. As an important byproduct of this effort, functional updates are proposed, which complement the existing, imperative updates of the LINQ to XML API.

Lets hope both these technologies make Visual Studio's Orcas release. A post RTM add-on might suffice for the streaming API, but LINQ to XSD definitely deserves the resources required to make the VS vNext cut.

Technorati Tags: LINQ to XSD, LINQ to XML, XLinq, C# 3.0, VB 9.0, XML, XSD, XML Schema, Orcas

Monday, January 15, 2007

New SQL Server CE Technical Articles and Tutorials

Microsoft released in the last week five tutorials that cover the most important developer features of SQL Server 2005 Compact Edition (SSCE). For a welcome change, tutorials with code come in VB and C# versions. The following sections provide links to both versions, where applicable, and a copy of Microsoft's summary for each.


Application Deployment with Shared and Private Deployments (VB) Application Deployment with Shared and Private Deployments (C#) Summary: In this tutorial, you will learn about two different deployment scenarios available for deploying SQL Server 2005 Compact Edition with your applications: centrally installing SQL Server 2005 Compact Edition and privately installing SQL Server 2005 Compact Edition as part of your application. You will be using Visual Basic.NET in this tutorial. (22 printed pages)
Rapid Application Development Using SQL Server 2005 Compact Edition and Visual Basic.NET Rapid Application Development Using SQL Server 2005 Compact Edition and Visual C#.NET Summary: In this tutorial, you will learn how to leverage the design capabilities integrated into Visual Studio 2005 in order to rapidly develop applications that use data stored in a SQL Server 2005 Compact Edition database. You will be using Visual Basic.NET in this tutorial. (21 printed pages)
SQL Server 2005 Compact Edition Data Access with the SqlCeResultSet and Visual Basic.NET SQL Server 2005 Compact Edition Data Access with the SqlCeResultSet and Visual C#.NET Summary: In this tutorial, you will learn how to leverage the design capabilities integrated into Visual Studio 2005 in order to rapidly develop applications that use data stored in a SQL Server 2005 Compact Edition database. You will be using Visual Basic.NET in this tutorial. (21 printed pages)
Configuring Internet Information Services for SQL Server 2005 Compact Edition Remote Data Access and Merge Replication Summary: Learn how to configure Internet Information Services (IIS) for both remote data access (RDA) and merge replication, two technologies that you can use to synchronize data between a Microsoft SQL Server 2005 back-end database and a local Microsoft SQL Server 2005 Compact Edition database. This tutorial covers everything that you must do to configure a server for data synchronization using RDA. To perform data synchronization with merge replication, you must also configure SQL Server 2005. Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual Basic.NET
Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual Basic.NET Remote Data Access Synchronization with SQL Server 2005 Compact Edition and Visual C#.NET Summary: In this tutorial, you will learn how to create a Microsoft Windows Forms application using Microsoft Visual Basic.NET that synchronizes data between a Microsoft SQL Server 2005 database and a Microsoft SQL Server 2005 Compact Edition database using Microsoft SQL Server 2005 Compact Edition Remote Data Access (RDA). (48 printed pages)
The tutorials claim that Windows XP SP2, Visual Studio 2005 SP1 (not Visual Studio Express), and SSCE components are required to run the tutorials. I plan to test them with Windows Vista Ultimate, VS 2005 SP1 with Visual Studio 2005 Service Pack 1 Update for Windows Vista Beta, SQL Server 2005 Standard Edition SP2 December CTP for replication. Stay tuned for my results. Update 1/17/2007: There's a new "What's New in SQL Server Compact Edition" whitepaper and updated "An introduction to SQL Server 2005 Compact Edition" Knowledge Base article available. Technorati tags:
, , , , , , , , , , , ,

Friday, January 12, 2007

Microsoft Releases Orcas January 2007 CTP

Microsoft posted on January 10, 2006 at about 8:30 p.m. PST the long-awaited Microsoft Pre-release Software Visual Studio Code Name "Orcas" - January 2007 Community Technology Preview (CTP), formerly known as the Orcas December 2006 CTP. The download is available as an extractable executable, consisting of VSDec2006CTP.part1.exe and six VSDec2006CTP.part#.rar files (4.21 GB). Alternatively, you can create a Virtual Server 2005 or Virtual PC 2004 image (.vhd file) by combining the self-extracting base image (VSCTPBase.exe, 1.12-GB) with VSDec2006CTP.part01.exe and seven VSDec2006CTP.part0#.rar files (4.91 GB). Notice the 0 prefix that distinguishes the executable from the virtual server files. The Virtual Server OS is Windows Server 2003 Enterprise Editon SP1, not Windows server 2003 R2. The virtual machine files extract to Base01.vhd (2.86 GB), VSDec2006CTP.vhd (11.45 GB), and VSDec2006CTP.vhc (13 kB). Starting the virtual machine adds Base01.vmc (11 kB) and VSDec2006CTP.vsv saved-state file (1.51 GB). Thus you need about 22 GB of free disk space for starters.

Orcas January CTP Shortfalls

The January CTP's LINQ components (especially LINQ to SQL) aren't fully cooked, as evidenced by the following comment from a January 12, 2006 post to Charlie Calvert's C# Community Blog:

This build of Orcas has good support for LINQ to Objects and only shaky support for LINQ to SQL. There has, however, been good support for LINQ To SQL in the internal builds I've seen in the last few days. These internal builds all target the February CTP.

The January 2007 CTP Release Notes state:
  • ADO.NET Entities in this current drop do not support LINQ—The private CTP of ADO.NET (ADO.NET August CTP) does offer a preview of LINQ integration but that functionality does not work with the Orcas January 2007 CTP.
  • No ADO.NET tools support for the Orcas January 2007 CTP—There is a publicly available ADO.NET Tools CTP. Please note these tools work with the ADO.NET August CTP and not the Orcas January 2007 CTP.
  • You can’t import Whidbey SDM Designer files in Orcas—No workaround is available for this issue.
The "Overview" section of the download page states that the January CTP includes SQL Server Compact Edition; it doesn't. You'll find that the CTP installs a Microsoft SQL Server Everywhere Edition\v3.5 folder that contains outdated Sqlce*30.dll runtime files, not the Sqlce*31.dll files from January 2007's SQL Server 2005 Compact Edition Web (RTM) release. However, Visual Studio's Choose Data Source dialog opened from the Data Source Configuration Wizard does have an SQL Server 2005 Compact Edition choice. Erwyn van der Meer raises the issues of missing developer support for .NET 3.0—no documentation, project templates, or visual designers—or AJAX in ASP.NET. He also found that the WPF, WCF, and CardSpace versions are close to 200 builds earlier than RTM. Note: The Release Notes also describe the numerous problems that occur if you install the "VS 2007" bits side-by-side on a machine running VS 2005. There are three references to "VS 2007" in the Release Notes; Add/Remove Programs includes "Microsoft Document Explorer 2007" and "Microsoft Visual Studio 2007 Tools for Office Runtime," which would indicate that the Orcas team is confident of releasing VS vNext this year. .NET Framework 3.5 (GreenBits) is a 9.62-MB addition to .NET Fx 3.0. Data-intensive developers might want to delay extensive testing of LINQ features (other than LINQ to Objects) until the Orcas February [?] 2007 CTP. Installation Issues with Virtual Server 2005 R2 I attempted to install the extracted bits on the Virtual Server 2005 R2's Windows Server 2003 R2 standard edition in accordance with the download page's instructions. However, the following virtual machine setup instructions for Virtual PC 2003 don't work with Virtual Server 2005 R2. 6. Click the New button to launch the “New Virtual Machine Wizard”. 7. Navigate to the Options page and select "Add An existing Virtual Machine" radio button. 8. Click the Browse button and navigate to the location you extracted the files to and select VSODec2006CTP.vmc [sic] image 9. You will be prompted for the location of the base image and you should point to the Base01.vhd that you extracted earlier and click OK 10. Clear the “When I finish, open settings” checkbox and click OK 11. Select the new image entry and click Start You receive a message such as the following when you attempt to start the virtual machine:

Note: Click the images for full size versions or click here for a Web page with a set of larger images.

To set up the virtual machine on Virtual Server 2005 R2, substitute these steps after extracting the :

1. Click the Virtual Machine group's Add button to open the Add Virtual Machine page.

2. Type the d:\full path\VSDec2006CTP.vmc file in the Fully Qualified Path to File text box:

3. Click Add to create the new virtual machine from VSDec2006CTP.vmc.

4. Click the Virtual Disk group's Inspect button to open the Inspect Virtual Hard Disk page, and select d:\full path\VSDec2006CTP.vmc from the the Known Virtual Hard Disks list.

5. Click Inspect to open the "VSDec2006CTP.vhd" Virtual Hard Disk Properties page, which displays the error message in the Parent Virtual Hard Disk(s) text box:

6. Click the red error message to open the Update Virtual Hard Disk Parent page, and select the d:\full path\Base01.vhd item in the Parent Virtual Hard Disk Path text box:

7. Click Update Parent Path to return to the "VSDec2006CTP.vhd" Virtual Hard Disk Properties page, which now shows d:\full path\Base01.vhd in the Parent Virtual Hard Disk(s) Path text box.
8. Click Master Status. If VSDec2006CTP doesn't appear in the Remote View list, click Add, select d:\full path\VSDec2006CTP from the list, and click Add. 9. In the Master Status page, hover the mouse over VSDec2006CTP and select Configure to open the configureation page. Set the Memory, CD/DVD and Network Adapters values. 10. Hover the mouse over VSDec2006CTP and select Turn On. After a minute or two, Windows Server 2003's logon dialog appears. 11. 13.306 isn't the correct set of Virtual Machine Additions for this relase, so click Virtual Machine Additions to open the page of the same name, mark the Install Virtual Machine Additions check box and click OK. 12. Click the thumbnail to turn on remote operation. Type your Administrator credentials to open the "VSDec2006CTP" Remote Control page. 13. Log on with Right Alt + Del, accept Administrator as the user name and type P2ssw0rd as the password.

New LINQ Resources While you're waiting for the Orcas February 2007 CTP, take the time to explore these new LINQ-related resources:

Microsoft's Wes Dyer has produced an eight-part treatise on LINQ queries:

  1. Comprehending Comprehensions—What are queries? How are queries treated by the compiler?
  2. Transparent Identifiers—How are local variables introduced by queries?
  3. Thus Quoth the Humble Programmer—What are expression trees? What are lambdas translated into?
  4. Reading and Writing Queries—What mental models are useful in reading and writing query expressions? What are the scoping rules for queries?
  5. A Model for Query Interpretation—How can we think about query evaluation? Is it possible to think of queries in terms of the queries and not the rewrites? What is the conceptual model for Linq to Objects queries?
  6. How Linq to Objects Queries Work—What causes Linq to Objects queries to be lazily evaluated? How are the results computed? What underlies the conceptual model for Linq to Objects? Why do queries exhibit their debugging behavior?
  7. Having Trouble with Queries—What constitutes good error messages? How are effective error messages for queries generated in the face of type inference and significant syntactic sugar?
  8. Another Model for Query Interpretation—Are there other models for query interpretation besides an imperative one? Why are some queries declarative and others not?

Eric Lipper discusses lambdas in the following two recent posts:

Australian .NET developer Troy Magennis's Hooked on LINQ wiki is up to 88 pages. All of the preceding resources are C#, but the query syntax is quite similar in VB.

Updated: January 15, 2007

Technorati Tags: Orcas, ADO.NET vNext, Entity Framework, Entity Data Model, LINQ, LINQ to Entities, LINQ to XML, LINQ to SQL, Entity SQL, eSQL, DLinq, XLinq, C# 3.0, VB 9.0

SQL Server 2005 Compact Edition RTM Available

Microsoft delivered its Web release of SQL Server 2005 Compact Edition (SQLceSSCE) on January 11, 2006. The Web release finally eliminates previous references to Windows Mobile and SQL Server 2005 Everywhere Edition.
SSCE is a lightweight, single-user relational database engine designed for client-side data storage on Windows desktops, laptops, and devices. Its query engine supports a subset of SQL Server 2005 data types and T-SQL.
The Web release consists of the following four downloadable components:
SQLce30setupen.msi—the only file that doesn't use the SSCE abbrevation—apparently didn't need updating from the SQL Server Mobile 3.0 version.
Support: SSCE's main page is here and the newsgroup is here. There's an SQL Server Compact Edition blog and Steve Lasker's blog has links to many SSCE resources. Steve is the SQL Server Program Manager/Technical Lead for Smart Client and Occasionally Connected Systems.
Programming and Managing SSCE
The SqlServerCe namespace provides data access classes similar to ADO.NET's SqlClient. Installing the runtime also registers an OLE DB driver for applications running unmanaged code. Data files (*.sdf) are stored in the file system and are compatible with Windows Mobile 3.0 applications. SSCE 3.1 is ideally suited for Click Once installation of data-driven Windows forms apps. See my May 1, 2006 "SQL Server 2005 Mobile Edition Goes Everywhere" Special Report for an early look at SSCE. The SQL Server Management Studio [Express] SP2 December 2006 CTP or later (SSMS[X] SP2) is required to manage SSCE if you aren't running Visual Studio 2005 SP1 because the VS Express editions don't include Server Explorer. But you'll find SSMS[X] SP2 to have somewhat better management tools than VS 2005 SP1.
Note: Download SSMSX December 2006 CTP here or the full SSMS version here.
Use SSMS[X] or VS 2005 SP1's or T-SQL DDL scripts to create and modify SSSCE's *.sdf data files, which store character-based data in Unicode only. You'll need to use DDL for operations other than creating databases and adding, deleting and modifying tables.
For an in-depth look at programming SSCE with Visual Basic .NET, download a copy of SQL Server guru and author Bill Vaughn's Hitchhiker's Guide to Microsoft SQL Server 2005 Compact Edition eBook (a bargain at the US$9.95 introductory price).
Replicating SSCE
SSCE supports merge replication and Remote Data Access synchronization scenarios with SQL Server 2000 SP3 and later. The next version (3.5) of SSCE will scheduled to include a new Microsoft Synchronization Services for ADO.NET (code-named OCS for Occasionally Connected Systems) in Visual Studio Orcas. A pre-release version of SSCE v3.5 is included in the Microsoft Pre-release Software Visual Studio Code Name "Orcas" - January Community Technology Preview (CTP).
Update 1/27/2007: Microsoft released on January 22, 2007 a Microsoft Synchronization Services for ADO.NET CTP, which also includes support for SSCE LINQ to Entities.
For more details on SQL Server <-> SSCE replication technologies, see the "ADO.NET Sync Framework for Occasionally Connected Systems" post. An SQL Server Client Access License (CAL) is required for replication between SQL Server and SSCE. (SQL Server 2005 Express Edition (SSX) has the same CAL requirement for replication.)
Note: Microsoft says Virtual Server 2005 R2 SP1 is not a supported system for SSCE. This might explain my problem with installing the runtime on "virtualized Vista" but not the lack of problems with "virtualized Windows Server 2003 R2" installation.
Update 1/15/2007: Abbreviation changed from SQLce to SSCE. Google shows 124,000 hits for the SQLce and 14,000 for SSCE abbreviations, but Microsoft appears to have standardized on SSCE. SSCE is consistent with use of SSX for SQL Server Express and SSMS[X] for SQL Server Management Studio [Express].
Update 1/27/2007: Updated for OCS CTP and added links to SSMS[X] downloads.
Technorati tags: , , , , , , , , , , , , , ,

Tuesday, January 09, 2007

Problem Installing SQLce RC1 on Virtual Windows Vista

I've attempted to install SQL Server Compact Edition RC1 on Windows Vista Ultimate (RTM) running under Virtual Server 2005 R2 SP1 Beta 2 (1.1.531.0 EE R2 SP1) as Administrator. SQLServerEv31-EN.msi (dated 12/19/2006) creates the \Program Files\Microsoft SQL Server Everywhere Edition\v3.1 folder but only adds the System.Data.SqlServerCe.xml file.

None of the sqlce*30.dll runtime files, System.Data.SqlServerCe.dll, or EULA_EN.rtf appear in the ...\v3.1 folder. However, the 3.1 version of System.Data.SqlServerCe.dll appears to install because 1) it's in the GAC and 2) the [DataDirectory] macro works in a connection string. We've tried installing with or without UAC to no avail.

There's no problem running SQLServerEv31-EN.msi with a "concrete" Vista Ultimate instance on an ordinary partition. SQLServerEv31-EN.msi also installs correctly on a virtual Windows Server 2003 R2 instance. In either of these two cases, all expected SQLce files are present and accounted for.

Has anyone else seen this problem? Yes or no, please leave a comment.

Update 1/15/2005: Microsoft says that Virtual Server 2005 R2 isn't a supported platform for SSCE.

Previous posts on SQLce: ADO.NET Sync Framework for Occasionally Connected Systems (11/9/2006) and SQL Server 2005 Compact Edition RC1 Available (11/8/2006)

P.S.: So far, I haven't yet encountered any other issues with SQL Server 2005 Express with Advanced Services SP2 or Visual Studio 2005 SP1 with the Visual Studio 2005 Service Pack 1 Update for Windows Vista Beta running under Virtual Server 2005 R2 SP1 Beta 2.

Wednesday, January 03, 2007

1105 Media Acquires Fawcette Technical Publications' Assets

1105 Media, Inc., the owner of numerous print publications and related Web sites has acquired the operating assets of Fawcette Technical Publications (FTP), former publisher of Visual Studio Magazine (VSM) and producer of the VSLive!, Software Architecture Summit, Web Design World, and Web Builder 2.0 conferences, according to a January 2, 2006 Redmond Magazine news article.

Other FTP properties acquired include Java Pro, Window Server System Magazine, and Enterprise Architect online magazines, and Insight newsletters, including .NETInsight, JAVAInsight, XML & Web Services Insight, Software Architecture Insight, and Web Design & Development Insight.

The acquired properties will become part of 1105 Media's Redmond Media Group (RMG) , which publishes
Redmond Magazine (formerly Microsoft Certified Professional Magazine), Redmond Channel Partner, and Redmond Developer News together with related Web sites, and produces the semi-annual TechMentor and new TechPartner conferences. RMG was formed from 101communications' properties, which 1105 Media acquired in April 2006.

See links to recent VSM articles and FTPOnline special reports below the profile section to the right.

Update 1/8/2007: Berkery, Noyes & Co., LLC represented Fawcette Technical Publications in its sale of assets to 1105 Media.

Update 1/27/2007: Zacks Research posted on 1/8/2007 a brief interview with 1105 Media CEO Neal Vitale entitled "Dealmaker Indeed."

According to a Prospectus Supplement to a Prospectus dated September 29, 2006 for the sale of 4 million shares of its common stock, MCG Capital Corp. had made the following investements in Fawcette Technical Publications Holding: Senior Debt (16.5%, Due 12/06) $12,579,000; Subordinated Debt (16.4%, Due 12/06) $4,656,000; Series A Preferred Stock (8,473 shares) $2,569,000l; Common Stock (5,010,379 shares) 36% $0.0. MCG is an "internally managed, non-diversified, closed-end investment company that has elected to be regulated as a business development company under the Investment Company Act of 1940."

Technorati Tags: , , , ,