This is a neat little tip I just ran across. Sometimes it would be nice to select from the results of a stored procedure and use the data elsewhere. Standard disclaimer: if you need this type of functionality in a production app, a User Defined Function would be a better option. But for something quick and dirty, say in a script you are going to use once or something, this is pretty useful.
First make sure the server where your stored procedure lives has the data access server option enabled.
EXEC sp_serveroption 'MySQLServer', 'data access', 'true'
GO
Then use openquery to select from the stored procedure
SELECT field1, field2 FROM OPENQUERY(MySQLServer, 'EXEC Database1.dbo.sp_mySproc')
This would have probably been more useful to know a few years ago, but still helpful for older versions of SQL Server or just for something quick.
Guthrie just
posted a bunch of new stuff they are getting ready to drop, including the final release of the VS2005 Web Application Project, but what really caught my eye was the
CSS control adapters. Basically this will let you override the output of the ASP.NET controls by providing your own CSS style based rendering. You can even do this at the user agent level. It's nice enough that the controls in ASP.NET 2.0 render valid XHTML, but this is the icing on the cake. Very cool. It's not application code either, you can separate it out using .browser files. There is a new XhtmlTextWriter class that inherits from TextWriter (what most controls use internally to spit out the markup). This makes it even easier to output valid Xhtml yourself if you want to override the default rendering.