Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase «««45678

Introduction to Bitmasking in SQL Server 2005 Expand / Collapse
Posted Thursday, May 21, 2009 2:29 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, November 26, 2012 8:50 AM
Points: 27, Visits: 150
I can understand why people might not like the idea of storing multiple column values in one encoded field, but it does occur to me that this would be a great technique for passing values in a web app. instead of

Bitmask all the values selected and pass them encoded

then decode on the page to values for SQL or whatever.

You get a lot of things here: users can't fish by inserting other values in the POST string; your POST string looks LEE7 (sorry...); you have a shorter POST string.

If you do want to store bitmasked vals in the DB, then your response data could also be de-coded on the client side using Javascript (if this is supported). The downside there is, you can see Javascript in View Source. But, seems like this technique could help speed up data-intensive web applications.

Just my 2 centavos. Sorry it's off-topic, but hey.
Post #721698
« Prev Topic | Next Topic »

Add to briefcase «««45678

Permissions Expand / Collapse