ADO.NET Review: Multiple Select Queries in one SqlCommand

April 29, 2008 16:22 by Ryan Garaygay

If you perform multiple select queries inside your stored procedures I believe you actually return all of the result sets to the client. (except when you assign a value to a parameter like SELECT @myVar = [ColumnA] FROM Table1). This is something to be careful of since you might unnecessarily return results sets that you actually don't need to return.

But this behavior also has an advantage. Obviously, if you need to retrieve two result sets, there is no need to create two or more SqlCommand to retrieve them. I believe this is handled under the hood if you use SqlDataAdapter.Fill where the dataset being filled will result the sets as part of its tables collection. However in this example we will illustrate how it can be done using SqlDataReader using non other than Reader.NextResult() method.

This is something I don't see often (might not be the case for you) so without much further ado, here's a sample code that might explain better than words. More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Link: Recent SQL Injection Attacks

April 28, 2008 07:56 by Ryan Garaygay

I figured this would be a good reminder. I've known some people who would have thought just because they create client side validators and use stored procedures they are no longer vulnerable to SQL injection attacks. Ready the full article from the link below and it will contain links on how to protect yourself from such attacks too.

You may have seen recent reports that have surfaced stating that web sites running on Microsoft’s Internet Information Services (IIS) 6.0 have been compromised. These reports allude to a possible vulnerability in IIS or issues related to Security Advisory 951306 which was released last week.

Full article : SQL Injection Attacks on IIS Web Servers - BillS IIS Blog

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Link: Understanding when to use a Finalizer in .NET

April 28, 2008 07:52 by Ryan Garaygay

A common problem we see when moving to .NET all revolves around the finalizer.  There are a few reasons that this happens:

  • Developers move from C/C++ to C# and are used to created classes with a constructor and destructor.
  • Developers don’t understand when they need to implement Dispose or Finalize and thus create them when they aren’t needed.

Read more of the article here : Understanding when to use a Finalizer in your .NET class

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Link: Bjarne Stroustrup on the Evolution of Languages

April 27, 2008 16:31 by Ryan Garaygay

I don't need to be telling this to geek sbut for those who needs a refresher, Stroustrup is no other than the creator of C++ which undeniably is still very influential (could be an understatement) up to this day and the future. Ohh yes, the creator of such a legendary language is still very much alive and kicking.

It's always interesting to know what legends have to say so read from the following link : MSDN Magazine Inteview with Bjarne Stroustrup

This brilliant guy has humor. Quoting "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone. - Stroustrup"

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

ADO.NET Review: Multiple Active Result Set (MARS)

April 26, 2008 09:33 by Ryan Garaygay

Quoting from the SQL Programmability and API Development Team Blog: Multiple Active Result Set or MARS is defined as

a new programming interface introduced in SQL Server 2005. It enables multiple result sets to exist at the same time for a given connection. To say it in a simple way, you can make a connection to server and then submit multiple requests to serve

To illustrate, More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Caution when using custom Bookmarks Location

April 26, 2008 06:44 by Ryan Garaygay

In my previous post Firefox Bookmarks Location and Moving it I mentioned about browser.bookmarks.file in about:config to save your bookmarks in a different location.

I just wanted a short mention of a caveat that if by any chance you have it pointed to a removable disk (eg. external hard drive/disk) and being careless you could loose those bookmarks More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Going Green Checklist : 101 Ways to get started

April 24, 2008 18:07 by Ryan Garaygay

Martha Stewart’s Going Green Checklist (with 101 ways to get started)

Found this from my friend/colleague Jeigh's blog post. Great, more blog posts for the environment.

And once again, seriously turn those PC off when you're not using them (or at least the monitor) and hey I just remembered, PC's take in energy but would be more efficient to save digital files than have tons of paper pile up on your desk (unless you actually do recycle them). 

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList