SqlResultSet, MARS and SQLCLR

In the current version of the .NET framework, if you need to open two DataReaders at the same time, you need to open two connections. This will be not necessary in Yukon because it will support 'MARS'.

MARS is not available when you want to run your code as a CLR stored procedure. If you need to have two open statements inside Yukon, you had two options. One was using SqlResultset (which used a cursor). This wasn't very good but sometimes it could be acceptable. The other one was to connect to the same SQL database you are running into using SqlClient, which sounds like a hack to me.

SqlResultset is not going to be shipped on Whidbey, so now the only options ares to create a new SqlClient connection, or using the 'CREATE CURSOR' T-SQL statements, which is similar to the SqlResultset, but more difficult to write.

 

2 Comments

  • I've been playing with ADO.NET 2.0 for a while now, and as cool as it is, I've never seen anything so likely to be misused. Between MARS, Notification Services and the Always Connected ResultSet, I think there's going to be some mayhem when things first come out...hopefully I'm wrong.

  • Now it looks like ResultSets are off the table for sure and that ObjectSpaces are off the supposed 6 month after feature pack (ie probably won't ever see life).

Comments have been disabled for this content.