Log in

View Full Version : .NET Compact Framework and ADO.NET


Andy Sjostrom
08-01-2002, 07:46 AM
<a href="http://www.devbuzz.com/content/zinc_dotnet_sqlcedataadapter_pg1.asp">http://www.devbuzz.com/content/zinc_dotnet_sqlcedataadapter_pg1.asp</a><br /><br />Perhaps you saw the Windows CE 4.1 announcements a couple of days ago. Way down in the <a href="http://www.microsoft.com/presspass/press/2002/jul02/07-30NextWindowsCEPR.asp">press release</a> you can read about one of the operating system enhancements:<br /><br />"Updated .NET Compact Framework beta. The .NET Compact Framework is the smart device development platform for the Microsoft .NET initiative. The .NET Compact Framework brings the world of managed code and XML Web services to smart devices and is part of Microsoft's goal of providing customers with great experiences -- any time, any place and on any device."<br /><br />Derek Mitchell at deVBuzz.com has written an article about this .NET Compact Framework and how to get going with data access. If you are a developer I recommend this article!<br /><br />"One of the biggest challenges in adapting to .NET is getting to grips with the new data access methodology - ADO.NET. OLE DB providers are no longer used, instead they have been usurped by .NET managed providers which are used to manage data access between the data source and your application. This may seem like an extension of the OLE dB provider approach but that is where the similarity ends. Under the hood the implementation is very different and COM has been removed from the equation. Server-side cursor support has been dropped in ADO.NET owing to the server performance and locking penalties; consideration being cast rather in favor of forward-only, read-only resultsets."<br /><br />"Now we get to the fun part. I was putting together a tutorial on how to use combo-boxes in .NET CF and was generating some XML to use as test data. Actually the original idea here was to do some perforce testing on datasets when I lost focus and got onto the combo-box idea (more about this next week!). So my plan was that I would provide an XML file in the tutorial and then instantiate the SQL Server CE database from the XML. This is where the flexibility of the .NET data adapters and data sets really becomes apparent. So what is a dataset you ask. Think of it as your private in-memory data storage object. You can utilize one dataset populating it from different date sources, setting up relationships between the data tables it contains and then write the changes back to their respective sources. Another thing you can do is create a dataset from one source and then use a data adapter to write it to another source essentially using the data adapter as an update bridge. All this pretty easily too."<br /><br /><img src="http://www.pocketpcthoughts.com/images/devbuzz_01.gif" />