August 2017
« May    



Recent Posts


asp .net asp .net membership browsers computer crash Guy Burstein javascript link-o-rama LINQ office 2007 optimization outlook 2007 performance ScottGu SQL Server t-sql web servers workarounds xmlhttprequest

I Canz Code!

SQL: Updating One Table with the Values of Another Table

Thursday, March 4th, 2010

For one reason or another, I often have to update rows in one table with the values in another table, and every time I do, I end up Googling for the answer.
I don’t claim to have come up with this little code snippet* but I’m putting it up here so I don’t have to waste [...]

Virtual Paths, LinkButtons and A Hrefs

Thursday, October 9th, 2008

When you should consider replacing LinkButtons with good ol’ tags, and how you can use ‘em with a little bit of .NET capability.

LINQ, Stored Procedures and Multiple Recordsets: How-To

Saturday, June 7th, 2008

Okay, here’s my entire test-run of how to get LINQ to work with stored procedures that return multiple recordsets just a dummy project.

Click on pen to var showHover=true;

LINQ, Stored Procedures and Multiple Recordsets

Thursday, May 15th, 2008

Update: This post has a follow up here: LINQ, Stored Procedures and Multiple Recordsets: How-To
I wanted to use a LINQ with a stored procedure that would return multiple recordsets, like this:

–first set
SELECT value1 FROM table1
–second set
SELECT t1.value1, t2.value2
FROM [...]

ScottGu – Da LINQ Man!

Thursday, May 15th, 2008

For my own reference, the various parts of ScottGu’s LINQ series:

Part 1: Introduction to LINQ to SQL
Part 2: Defining our Data Model Classes
Part 3: Querying our Database
Part 4: Updating our Database
Part 5: Binding UI using the ASP:LinqDataSource Control
Part 6: Retrieving Data Using Stored Procedures
Part 7: Updating our Database using Stored Procedures
Part 8: Executing Custom SQL [...]

SQL Server 2005’s Pivot…PIVOT, PIVVOOOOT – Ross Gellar, Friends

Friday, May 9th, 2008

Every time I see SQL Server’s 2005 PIVOT, I think of that episode of Friends where Ross tries to guide his friends as they bring up the couch to his apartment.

But serious, PIVOT is one of those things that I’m still trying to wrap my brain around.
I’m currently digesting this: Pivots with Dynamic Columns in [...]

ASP .NET Membership: Where’s the UserID?

Friday, April 25th, 2008

I couldn’t figure this out intuitively, but good news: there is a way to get it from the MembershipUser class.
They don’t call it UserID (duh) but ProviderUserKey
dim user as MembershipUser = Membership.GetUser()
dim userGUID as GUID = user.ProviderUserKey
dim userID as String = user.ProviderUserKey.toString

Click on pen to var showHover=true;

SQL Server: Data types text / ntext won’t play with sort or LIKE.

Tuesday, April 22nd, 2008

Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Pretty self-explanatory.
In order to compare or sort text/ntext, you need to convert it to varchar (or similar datatype that can allow compare/sort). Note, text/ntext often has a large capacity [...]

LINQ here, LINQ there, LINQ everywhere

Tuesday, April 22nd, 2008

According to DA GURU (that’s Scott Guthrie), on his article LINQ to SQL (Part 5 – Binding UI using the ASP:LinqDataSource Control)
We will also take advantage of the built-in paging/sorting support within LINQ to SQL to ensure that features like the product listing paging/sorting are performed not in the middle-tier, but rather in the [...]

ASP .Net says: Look, Ma, I’m a Javascript!

Saturday, April 19th, 2008

Here’s was my problem yesterday, in a cool scripted form:
Mission> Your mission, should you choose to accept, is to allow third party sites to grab from this system you are developing and display our content. These undisclosed third party sites may be in ASP .Net, ASP, PHP, or even… [ominous pause] static HTML. You have [...]