This post originated from an RSS feed registered with .NET Buzz
by Sam Gentile.
Original Post: SqlCeResultSet/SQL Mobile in Whidbey CF
Feed Title: Sam Gentile's Blog
Feed URL: http://samgentile.com/blog/Rss.aspx
Feed Description: .NET and Software Development from an experienced perspective - .NET/CLR, Rotor, Interop, MC+/C++, COM+, ES, Mac OS X, Extreme Programming and More!
There are a whole lot of things different about programming for mobile devices with the CF versus the desktop framework. One of the problems encountered today, is that on a Compact device, DataSets are very memory intensive and slow.You can use a SqlCeResultSet but it is forward-only and non-updatable. In SQL CE 3.0 (SQL Mobile) and .NET CF 2.0, I have learned about the usage of SqlCeResultSet. SqlCeResultSet exposes an updatable, scrollable cursor so that compact apps can directly access a SQL Mobile Edition database without double buffering data on the device with a DataSet. There isn't hardly anything written on SqlCeResultSets although they are public knowledge on Microsoft's SQL site. I can't quote any perf numbers, but is a lot faster and solves a number of problem scenarios that exist today. I'm not sure I can post sample code but basically a SqlCeResultSet is obtained via a SqlCeCommand.ExecuteResultSet command. You can then update as well as do data binding. Very handy indeed.