Hi Matt,
Whether you need it or not depends on the actual code, which may be pretty hard to figure out.
Datashaping lets you retrieve associated records as a "column"(, or a chapter as it's called if I recall correctly). For example, consider this custom result set
Code:
Id CustomerName AssociatedOrders
123 Johnson <All Orders for Johnson>
456 Somebody Else <All Order for Somebody>
With this resultset you can retrieve all associated orders for a custom by looping through the outer result set and then accessing the AssociatedOrders column as a new recordset that you can loop through as well.
All nice and easy, but most of the times not necessary.
I think a long time ago a number of articles on popular sites like 4GuysFromRolla,
www.asp101.com and
www.15seconds.com featured data shaping because I see it used a lot in old classic ASP sites we're maintaining. Apparently developers thought it was useful and applied it to all connections and connectionstrings without considering the consequences and without only applying where it made sense.
One additional "benefit" that datashaping gives is that it gives an accurate record count by default. For standard forward-only cursors recordsets you get -1 as the RecourdCount and you have to either manually loop through the Recordset and count (which is what RecordCount does anyway), or open the Recordset so it supports RecordCount (using adOpenStatic and adLockOptimistic if I recall correctly). Changing your connectionstring by removing data shaping may start to give you -1 as the RecordCount.
So to cut a long story short: it depends. The two main dangers I see from removing data shaping is the loss of the chapter functionality. That should be relatively easy to spot by looking for code like this:
Set mySubRecordset = myMainRecordset("SubRecordset").Value
RecordCount may be more difficult to spot as you probably have a lot of them, some related to datashaping while others may not. And showing something like:
Showing records 11 to 20 from -1
on your site below a paged resultset looks stupid, but may be a difficult bug to find.... ;)
Hope this helps. It's been a while since I worked with datashaping in ADO, but I think the above is reasonably accurate.
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.